dpfaffenbauer / pimcore-minify

Abandond - Pimcore Plugin to Minify CSS and JS
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Improvement: faster cache handling #6

Closed Yivan closed 8 years ago

Yivan commented 8 years ago

It seems cache is handled by a md5 of all the content. So before checking the cache, all file are readed, parsed, concatened. And finally a md5 is done (can be long on so much long datas if many CSS are combined). At each HTML server query the process is made again.

Do you think it could be improved ? I get two ideas for this:

1- The more easy to implement I thing by checking modification dates and make a md5 of this (a concat of all last modification dates of the files). And after if not cached we parse the content of the file (it will make 2 access to each files, one for checking last modification date and another for content, but maybe will be faster in the end as when it will be cached just the date will be checked).

2- Maybe this one need a more complex rewriting I guess the included cache in mrclay/minify is not used actually ? (as it seems some cache technics are implemented, see here please: https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md). Maybe we could rely one those ? (but for this i think we should change the way it work by using the htaccess combination, see the github homepage of the projet, they talk about http://example.org/min/?f=min/quick-test.css).

Yivan commented 8 years ago

Just for reference, i opened an issue on Pimcore about caching Less file. Maybe a common technics could be found: https://github.com/pimcore/pimcore/issues/1065

dpfaffenbauer commented 8 years ago

This plugin is more or less deprecated. There are now much better options for minimizing css/js. Google mod pagespeed for example.