-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
napi_create_external_buffer
is super slow
#53804
Comments
napi_create_external_buffer
is super slow
@ronag this is the code for napi_create_external_buffer
If you built a version of Node.js commenting out
That would introduce a memory leak but might show if the slowness is in the base Node functionality or due to node-api overhead that might be optimized. The main thing that we were thinking it would be good to understand is if the slowness is in |
@vmoroz is going to play around a bit with the implementation as well to see what might be possible in terms of flatenning/removing overhead. |
Removing the finalizer improves things. |
Add a micro benchmark for external buffer creation. PR-URL: nodejs#54877 Refs: nodejs#53804 Refs: nodejs#44111 Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Given the following example:
more than 50% of the time is spent with
napi_create_external_buffer
which I would assume should be a rather fast operation...The text was updated successfully, but these errors were encountered: