Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The php_jsmin extension, being pre-compiled code, is likely to be significantly faster than the PHP-based JSMin even when using APC. Attached is a patch to enable its use.
Comment | File | Size | Author |
---|---|---|---|
#4 | 0001-Add-support-for-ypass.net-s-conversion-of-jsmin-to-a.patch | 5.03 KB | dougp |
javascript_aggregator.module.php_jsmin.patch | 2.3 KB | GreenReaper |
Comments
Comment #1
AntiNSA CreditAttribution: AntiNSA commentedAnyone using this?
Comment #2
AntiNSA CreditAttribution: AntiNSA commentedSo, do you check the box for:
GZip JavaScript
Use php_jsmin instead of JSMin
Use JSMin+ instead of JSMin
aLL THREE, OR JUST ONE OF THREE , OR JUST GZ ZIP and php_jsmin?
Thanks for the help. Maybe good to put in readme
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedsubscribe/hijack... #1109978: Add support for php_jsmin extension
Committed this code
Comment #4
dougp CreditAttribution: dougp commentedI made my own version of this without realising that someone had already done it. I like my version better, it replaces the "javascript_aggregator_jsminplus" variable with a "javascript_aggregator_minifier" setting which allows you to select only one minifier.
I think ideally though, the module would be extensible with some sort of hook to implement other minifiers/javascript processors, there are quite a few other ones out there.