The Java script optimisation is executed on every cron.php job. It would be better that the optimisation is only done when it is needed. My cron jobs are currently every 7 minutes - I am not convinced that the javascripts change that often.

Comments

nburles’s picture

Status: Active » Closed (works as designed)

Unfortunately this is the only way that the optimisation can be done - Drupal 6 and 7 do not provide any hooks during the JavaScript aggregation process, and so it must be run using a schedule (even if they did provide hooks, that would not really be the ideal time to run the compilation, due to the additional time between a page request and it being served - especially if a remote compilation is used!)

So every cron run, this module will check for un-optimised JS files, and optimise them (or some of them, if a limit is set). This means very little is actually done if all of the files are already optimised (just like any other module that defines a cron task - if there is nothing to do, they won't do much!)