napi: reduce gc finalization stress by mhdawson · Pull Request #27085 · nodejs/node (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation13 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

mhdawson

#24494 fixed a crash
but resulted in increased stress on gc finalization. A leak
was reported in #26667 which
we are still investigating. As part of this investigation, I
realized we can optimize to reduce the amount of deferred finalization.
Regardless of the root cause of the leak this should be a
good optimization. It also resolves the leak for the case being
reported in #26667. The OP in #26667 has confirmed that he can
still recreate the original problem that #24494 fixed and that
the fix still works with this optimization

Checklist

@nodejs-github-bot

@nodejs-github-bot nodejs-github-bot added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Apr 4, 2019

@mscdex

s/finaliation/finalization/ in commit message

@mhdawson

@mscdex thanks for catching that, fixed.

bnoordhuis

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in commit log: s/gcc/gc/

@mhdawson

nodejs#24494 fixed a crash but resulted in increased stress on gc finalization. A leak was reported in nodejs#26667 which we are still investigating. As part of this investigation I realized we can optimize to reduce amount of deferred finalization. Regardless of the root cause of the leak this should be a good optimization. It also resolves the leak for the case being reported in nodejs#26667. The OP in 26667 has confirmed that he can still recreate the original problem that 24494 fixed and that the fix still works with this optimization

@mhdawson mhdawson changed the titlenapi: reduce gcc finaliation stress napi: reduce gc finaliation stress

Apr 5, 2019

bnoordhuis

@mscdex mscdex changed the titlenapi: reduce gc finaliation stress napi: reduce gc finalization stress

Apr 7, 2019

cjihrig

jasnell

@mhdawson mhdawson added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Apr 8, 2019

@mhdawson

@nodejs-github-bot

@danbev

danbev pushed a commit that referenced this pull request

Apr 9, 2019

@mhdawson @danbev

#24494 fixed a crash but resulted in increased stress on gc finalization. A leak was reported in #26667 which we are still investigating. As part of this investigation I realized we can optimize to reduce amount of deferred finalization. Regardless of the root cause of the leak this should be a good optimization. It also resolves the leak for the case being reported in #26667. The OP in 26667 has confirmed that he can still recreate the original problem that 24494 fixed and that the fix still works with this optimization

PR-URL: #27085 Reviewed-By: Ben Noordhuis info@bnoordhuis.nl Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: James M Snell jasnell@gmail.com

@mhdawson

This was referenced

Apr 23, 2019

This was referenced

Apr 23, 2019

@ricoli

@danbev could this please be backported to node10?

@danbev

@danbev could this please be backported to node10?

Sorry I don't have time to open a backport PR against 10 this week, but I'll try to do so next week unless someone beats me to it.

Labels

addons

Issues and PRs related to native addons.

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

c++

Issues and PRs that require attention from people who are familiar with C++.

node-api

Issues and PRs related to the Node-API.