Skip to content
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

Merged
merged 1 commit into from May 6, 2021

Conversation

indutny
Copy link
Contributor

@indutny indutny commented May 5, 2021

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 within uv_run() and now this backports a patch that makes napi_threadsafe_function calls scheduled while one was running happen on the same tick. Fixing the performance issue.

cc @codebytere @deepak1556 @zcbenz

Checklist

Release Notes

Notes: Improved performance of napi_threadsafe_function

@indutny indutny requested a review from a team as a code owner May 5, 2021 17:58
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 5, 2021
@indutny
Copy link
Contributor Author

indutny commented May 5, 2021

Would appreciate if it could get backported into 12-x-y branch.

@deepak1556 deepak1556 added the semver/patch backwards-compatible bug fixes label May 6, 2021
@indutny
Copy link
Contributor Author

indutny commented May 6, 2021

Wow, thanks for quick LGTM @deepak1556 What's the procedure here? Do we need more LGTMs, or is this PR good to merge already?

@deepak1556
Copy link
Member

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.

@deepak1556
Copy link
Member

Failing test is unrelated, merging.

@deepak1556 deepak1556 merged commit ad4def9 into electron:master May 6, 2021
@release-clerk
Copy link

release-clerk bot commented May 6, 2021

Release Notes Persisted

Improved performance of napi_threadsafe_function

@trop
Copy link
Contributor

trop bot commented May 6, 2021

I have automatically backported this PR to "12-x-y", please check out #29047

@trop
Copy link
Contributor

trop bot commented May 6, 2021

I have automatically backported this PR to "13-x-y", please check out #29048

@indutny indutny deleted the backport/node-38506 branch May 6, 2021 16:18
@indutny
Copy link
Contributor Author

indutny commented May 6, 2021

Yay, awesome! Thanks!

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants