-
Notifications
You must be signed in to change notification settings - Fork 12
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
Lazy load unbrotli.js and inflate.js #18
Comments
@RoelN can you determine priority for this? |
I just came across https://github.com/101arrowz/fflate which could perhaps replace inflate.js. It's only 8kb min/gzipped, but could even be smaller with treeshaking since we don't need all supported algorithms. |
Hey, well spotted, thanks! Reading up on fflate, I saw tiny-inflate which might be an even better fit, as we only need decompression? |
Worth to consider indeed. That does seem to be quite a bit slower, but might be ok for our usecase. |
@pascalw I see your question for priority, sorry I missed that. It's one of the requirements before going live, so perhaps you could pick this up at your earliest convenience? |
Unbrotli.js and inflate.js account for most of the weight of this module (66.9 KB gzipped, out of 92 KB). Which of the two is needed depends on the type of font file that is analyzed, so lazy loading these modules as needed could save quite a few bits.
The text was updated successfully, but these errors were encountered: