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
Micro-optimization: set cache header on kernelspecs logos #702
Labels
Comments
Hi @mlucool - this seems like a great idea. I don't know what is involved to do this, but I thought I'd point out the handler responsible for returning the logos (resources) in case you, or anyone else, would like to contribute the changes: jupyter_server/jupyter_server/kernelspecs/handlers.py Lines 11 to 32 in 62607ce
|
divyansshhh
added a commit
to divyansshhh/jupyter_server
that referenced
this issue
Mar 26, 2022
divyansshhh
added a commit
to divyansshhh/jupyter_server
that referenced
this issue
Mar 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
kernelspecs's often contain png logos. These logos are on the order of 3kb each. Since kernels can't share a logo, each kernel contains a copy of the logo it provides. This leads to 3*number of kernels of uncached content being loaded on each page. I have ~20 kernels today, so that's 60kb being sent per refresh. (Note: this was flagged in lighthouse).
Proposed Solution
Ideally, we'd be able to share generic logos, but since that is a bigger change, I propose we add long cache headers on logos served from
kernelspecs/<kernel>/logo-64x64.png
. Unlike the kernelspec itself, these are expected to very rarely change.The text was updated successfully, but these errors were encountered: