We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38290
    • 712 Posts
    Quote from: nuan88 at Sep 01, 2015, 12:43 PM
    To be clear I think JP is on to something. I can't say if he is right or wrong in this case, but he is asking the right questions and I think his rough calculus is really useful, of requiring some clear benefit considering the number of users who run into problems because of the option. I don't know what percentage this is but if its not insignificant then it should be part of the calculation.

    Mark and I have started working on a PR together that uses Grunt to concat & minify the core MODX files as part of the front end build. This allows us to do away with server-side minification entirely.

    This test shows the server-side minification wasn't even an optimization, it didn't make anything faster.
    https://github.com/modxcms/revolution/pull/12611#issuecomment-135655556

    This user story comparison is what the take away from this should be though. Just think about this:
    https://github.com/modxcms/revolution/pull/12611#issuecomment-135659086


    • User visits a Resource edit page with compress_js enabled
    • We send them 350kb of script in a single file
    • redactor.js is one of the included files
    • User disabled Rich Text on the resource and refreshes the page
    • New URL, so we send them all the scripts again and leverage the cache for none of them even though all we are doing is sending them same scripts minus redactor

    vs


    • User visits a Resource edit page with compress_js disabled
    • We send them 350kb or more of script in individual files
    • redactor.js is one of the included files
    • User disabled Rich Text on the resource and refreshes the page

    In the first example we have a cache usage of 0% meaning that we don't leverage the browser cache at all even though the only thing that has changes something has been removed and we are now sending less bytes. The URL changes, so we resend everything again. On no planet should this be considered optimization.

    In the second example we have a cache usage of 100%. We send nothing.

    Also, I think we should be less worried about minification and more concerned with documenting and encouraging people to make sure GZIP is enabled for the manager CSS and JS.




      jpdevries