I see that the simplenews_scheduler.js is explicitly told to not be aggregated. Is there a reason for this?

Line 163 in revision 1.11.2.7 says

drupal_add_js(drupal_get_path('module', 'simplenews_scheduler') .'/simplenews_scheduler.js', $type = 'module', $scope = 'header', $defer = FALSE, $cache = FALSE, $preprocess = FALSE);

Is there a reason why it should not be preprocessed or cached? If not then this can be changed to

drupal_add_js(drupal_get_path('module', 'simplenews_scheduler') .'/simplenews_scheduler.js', $type = 'module', $scope = 'header', $defer = FALSE, $cache = TRUE, $preprocess = TRUE);

I have been trying to optimize a reasonably high traffic site and I realized that this is adding around 100ms to the page load time because it is not being aggregated. If you can please confirm if it is OK for the js to be preprocessed and cached it would be great.

Comments

sgabe’s picture

I didn't use $preprocess = TRUE because this feature was under development so I prevented the .js file from being cached to easily follow the changes. In the commited release this should be cached, you are absolutely right. I will pay attantion to this in the upcoming releases. Thanks for your feedback!

Cheers,
sgabe

sgabe’s picture

Status: Active » Fixed

Committed to the dev release, so changing this to fixed.

Cheers,
sgabe

Status: Fixed » Closed (fixed)

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