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

Avoid the main handler for statics on ring (use wrap-file) #44267

Open
paoliniluis opened this issue Jun 16, 2024 · 0 comments
Open

Avoid the main handler for statics on ring (use wrap-file) #44267

paoliniluis opened this issue Jun 16, 2024 · 0 comments

Comments

@paoliniluis
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Seems that ring has a way to avoid passing a file through the handler if it exists https://github.com/ring-clojure/ring/wiki/Static-Resources. If we can use wrap-file on the code, we will save a lot of CPU resources since the request will avoid all of our handlers (and most probably the transmission will also be way faster)

Describe the solution you'd like
Implement wrap-file function for sending our css and js files

Describe alternatives you've considered
None

How important is this feature to you?
I have a strong feeling that this is the reason why Metabase takes 30 seconds on my 100MB symmetric connection to send a 6MB file from the US

Additional context
I don't know if this has any collateral damage, it should not I guess since statics are always the same (we just send the ones for embedding in case we detect that the user is going through that flow, but that shouldn't cause any weird scenario)

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

No branches or pull requests

1 participant