zhanjh / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Facilitate the use of Minify to output static files #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Note: this is not a defect, but an enhancement suggestion.

By design, Minify and similar solutions represent a small performance
overhead, since even with filesystem caching the PHP script must be
executed, check if the files were changed, check if the cache exist, etc.
(I may be wrong for some parts, since i don't know the code and i'm not a
PHP developer.) This is OK for small-to-medium-sized websites, but might be
a problem for high-traffic websites.

I'm not criticizing Minify or the optimization efforts of its developers,
but the fact is serving static files is simply more efficient.

While testing Minify (which is great), i used it to configure some groups,
then used a simple shell script to wget the resulting files and write them
to disk.

wget http://media.domain.tld/min/?g=common.css -O /some/path/css/common.css

It works fine. But maybe this could be a feature of Minify, as a
configurable option?

You may want to mark this suggestion as WontFix or Invalid, not a problem
with me. I just wanted to suggest this and have your opinion. :)

Original issue reported on code.google.com by fverschelde on 26 Apr 2009 at 10:01

GoogleCodeExporter commented 9 years ago
The PHP overhead is certainly a concern (though in my limited testing I found 
Minify 
outperformed Apache with mod_deflate, which apparently doesn't cache encoded 
versions). Also high-traffic sites should probably use a reverse proxy cache 
like 
squid, which would cache Minify's output.

My issue with releasing workflows with Minify is that *everyone* has a unique 
workflow/build process with different variables to consider: files hosted on 
separate host/CDN? CDN have mod_rewrite (so you can rev URLs)? Should source 
files 
be monitored for changes? How would we do this if PHP is out of the loop? cron? 
What 
about IIS?

Maybe a simple tool to output all the groups defined in groupsConfig.php and 
an .htaccess file would be a nice first step...

If you have more ideas, hit up the Google group.

Original comment by mrclay....@gmail.com on 29 Apr 2009 at 8:58