-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
chore: cherry-pick 7abc7e45b2 from node #29021
Conversation
Would appreciate if it could get backported into 12-x-y branch. |
Wow, thanks for quick LGTM @deepak1556 What's the procedure here? Do we need more LGTMs, or is this PR good to merge already? |
Yup a PR needs atleast 2 LGTM before landing, usually a 24hr period should suffice to cover that. This should be good to merge tomorrow. |
Failing test is unrelated, merging. |
Release Notes Persisted
|
I have automatically backported this PR to "12-x-y", please check out #29047 |
I have automatically backported this PR to "13-x-y", please check out #29048 |
Yay, awesome! Thanks! |
Description of Change
Backports: nodejs/node#38506
See: #28957 for discussion
In few words,
napi_threadsafe_function
was significantly slower in Electron due to scheduling each call on the next uv tick. We've patched electron in #28957 to let microtasks queue execute from withinuv_run()
and now this backports a patch that makesnapi_threadsafe_function
calls scheduled while one was running happen on the same tick. Fixing the performance issue.cc @codebytere @deepak1556 @zcbenz
Checklist
npm test
passesRelease Notes
Notes: Improved performance of
napi_threadsafe_function