JSMin aggregation broken

drupalina - November 2, 2008 - 15:00
Project:Javascript Aggregator
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi, I've just updraded from 1.3 to 1.4 of JS aggregator. I kept my previous jsmin.inc file inside that folder. And it seems like the new version of JSaggregator 1.4 is not picking it up.

In YSlow the aggregated JS file now shows as not minified (with a wopping 180k) and the pageloads REALLY slowed down 11-19 seconds. Then I switched to my old JSaggregator 1.3 and all is back to normal.

Please incorporate jsmin in the future releases of JSaggregator.

Thanks

#1

Rob Loach - November 3, 2008 - 08:36

The development version of JavaScript Aggregator has JSMin support, you just have to visit the administration page, and give it "jsmin.php" if you stick jsmin.php into your module directory. If you test this, and say it's good, I'd like to make an official release. Your version 1.3 must be a patch version, because it originally didn't have JSMin support.

#2

drupalina - December 3, 2008 - 17:11

Hi,

I've tested the .dev version, (I used jsmin-1.1.1.php in the module directory).

In my YSlow it displays my js aggregation file as NOT minofied and standing at 181.7K

Then, I switched back to my version of 1.3 and it showed the js aggregate as indeed minified and among the components it showed it at 85.9K (quite a difference)

I don't know if my 1.3 was a hacked version (probably yes), but it had a jsmin.inc rather than jsmin.php . This version was given to me by someone in these issue forums few months ago. I've had this version of the module for ages, and it served me well (even though I'd love to be able to put some of the JS files at the top and the rest of the aggregate at the bottom). Maybe you would like to infuse 1.4 and my version of 1.3 together

I'm attaching my 1.3 version if you want to have a look.

AttachmentSize
javascript_aggregator.zip 12.42 KB

#3

Rob Loach - December 3, 2008 - 20:12

You have to visit the settings and set the JSMin filename. In your case, you'd put in "jsmin.inc". Also, mind trying out 5.x-1.x-dev with that "jsmin.inc" setting?

#4

drupalina - December 3, 2008 - 20:39

Sure... Just tried the 5.x-1.x-dev version again. I visit the Performance settings page and set it to jsmin.inc (instead of jsmin.php). Then clear the JS cache. Then visit a random page, and it's all the same: after running YSlow it shows that JS aggregate file is NOT minified and is standing at 181.7K

#5

Rob Loach - December 4, 2008 - 02:28
Version:5.x-1.4» 5.x-1.x-dev

Hmm, very strange. I'll make sure I'm using the same version as you. I'll test this tomorrow.... I got permission from the author of the JSMin PHP library to commit this, so I'll commit it so that the JSMin version is the same.

#6

drupalina - December 4, 2008 - 16:56

Cool. But make sure to test my version of JS_aggregator 1.3 module beforehand. (See the attachment in my comment #2) It's actually very good. My aggregate file usually stands at 84k, while with yours it stands at 182k

#7

Rob Loach - December 5, 2008 - 07:54
Title:What happened to JSmin in 1.4???» JSMin aggregation broken
Component:Miscellaneous» Code
Status:active» fixed

Thanks for all the help on this. I just made a rather large commit of fixes as well as released 1.5:
http://drupal.org/cvs?commit=157025

  1. Added jsmin.php so that you don't have to manually add it yourself. Received permission from the author.
  2. Removed optimize JavaScript option because JSMin optimizes it for us.
  3. Cleaned up code
  4. Mimicked more how JavaScript is aggregated in Drupal 6
  5. Fixed the weird line spacing that was showing up
  6. Fixed the weird base_path() hack.

--project followup subject--

System Message - December 19, 2008 - 07:54

Automatically closed -- issue fixed for two weeks with no activity.

#8

System Message - December 19, 2008 - 08:01
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.