You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a web application that has to maintain very low cold start latency and is running on slow devices. After importing the pako library I've noticed a 10% increase in the parsing & execution time of the startup JS module. I've noticed that the library does initialization right after its files are loaded. After some investigation, I noticed that removing that lines of code solves the latency issue. I confirmed that no functions that use that array are called. I also excluded all other library files.
That piece of code is very fast to execute as part of an independent benchmark but slows down overall execution. The benchmarks don't take into account the initialization code. In older browsers, allocating Uint8Arrays of any size can either trigger a GC sweep or block a network thread (ArrayBuffers used to be allocated from the network heap).
Is it possible to introduce the option to pay the library initialization cost once we need it instead of doing everything upfront? This would also allow you to benchmark the overhead that is now hidden.
The text was updated successfully, but these errors were encountered:
I'm developing a web application that has to maintain very low cold start latency and is running on slow devices. After importing the pako library I've noticed a 10% increase in the parsing & execution time of the startup JS module. I've noticed that the library does initialization right after its files are loaded. After some investigation, I noticed that removing that lines of code solves the latency issue. I confirmed that no functions that use that array are called. I also excluded all other library files.
That piece of code is very fast to execute as part of an independent benchmark but slows down overall execution. The benchmarks don't take into account the initialization code. In older browsers, allocating Uint8Arrays of any size can either trigger a GC sweep or block a network thread (ArrayBuffers used to be allocated from the network heap).
Is it possible to introduce the option to pay the library initialization cost once we need it instead of doing everything upfront? This would also allow you to benchmark the overhead that is now hidden.
The text was updated successfully, but these errors were encountered: