GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — src: improve MakeCallback() performance by addaleax · Pull Request #41331 · nodejs/node Conversation
Member
Opening this as a better alternative to #41279. I could have sworn that there was a MessagePort benchmark: src: guard slightly costly check in MakeCallback more stronglysrc: store native async execution resources as
|
| info_->native_execution_async_resources[i]) | ||
| .ToLocalChecked(); | ||
| native_execution_async_resources_[i].Reset(context->GetIsolate(), obj); | ||
| js_execution_async_resources->Set(context, i, obj).Check(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@joyeecheung This code is effectively doing the same thing as before, but I did want to ask – what exactly are the semantics of the async stack after a snapshot? Is it expected that you start out in a state where there is an active async context, even though the underlying async operation doesn’t even exist in the deserialized instance? (Or, another way: Should the AsyncHooks state be serialized/deserialized at all?)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Would it make sense to add the benchmark (or a similar one) to the repo? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Absolutely – again, I could have sworn there already was one 🙂 So, yes, it does make sense, no, I’m not particularly eager to do something about it myself. 🙂 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 5f07d00...a4795ad |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is possible because the async stack is always expected to match the native call stack, and saves performance overhead that comes from the usage of `v8::Global`. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is fairly expensive code that unnecessarily bloats the contents of the inline function. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is possible because the async stack is always expected to match the native call stack, and saves performance overhead that comes from the usage of `v8::Global`. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is fairly expensive code that unnecessarily bloats the contents of the inline function. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is possible because the async stack is always expected to match the native call stack, and saves performance overhead that comes from the usage of `v8::Global`. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is fairly expensive code that unnecessarily bloats the contents of the inline function. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is possible because the async stack is always expected to match the native call stack, and saves performance overhead that comes from the usage of `v8::Global`. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This is fairly expensive code that unnecessarily bloats the contents of the inline function. PR-URL: #41331 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
|
Following up here with addon benchmark as result of this PR, seeing improvement with latest Node 17.4 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.