Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad performance in large files #3

Open
Yokutto opened this issue Apr 14, 2019 · 1 comment
Open

Bad performance in large files #3

Yokutto opened this issue Apr 14, 2019 · 1 comment

Comments

@Yokutto
Copy link
Contributor

Yokutto commented Apr 14, 2019

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

@C0nw0nk
Copy link
Owner

C0nw0nk commented Apr 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants