Bad performance in large files
Yokutto opened this issue · comments
Hi,
I noticied a bad performance from lua parsing a very large javascript file (more than 1Mb).
So I wanted to ask if it would be possible to use a way to cache a file based on HTTP cache headers, like cloudflare CDN does.
If you want to see what i'm saying, go to: https://cdn.aninya.com/index.js (Use a query string to bypass CDN cache).
Note: I also use pagespeed for optimization, but he don't impact on minification performance
It is possible but it might be better to be a seperate library or extension to do so users have the option of uncached and cached minification on files they expect to change.
Open to opinions on it though if people want it intergrated with the main script then so be it :)
Might require users Nginx configs to be running the following.
https://github.com/openresty/lua-nginx-module#lua_shared_dict
lua_shared_dict
Just to store the cached Minified mime types by the Lua script.