-
Notifications
You must be signed in to change notification settings - Fork 8
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
Performance issue of slice() function #24
Comments
@tuyennhv what sort of size of length-prefixed data are you seeing consume all this time during your profiling? Is it a few bytes on average or more like megabytes? |
I'm not able to debug the length-prefixed data as uint8arraylist is used in different consumers, but the one thing I notice is >90% of the time In
|
This optimisation is now included in the
bl follows semantics derived from node |
Profiling from ChainSafe/lodestar#4114 shows a significant time was used for Uint8Array memory allocation
With a 5-minute profile, it takes 16% of cpu time just for this function.
This is mostly called form "slice()` function as shown in libp2p/js-libp2p#1303
The text was updated successfully, but these errors were encountered: