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: skip costly pushing/popping if we pass zeroes as async context by ronag · Pull Request #41279 · nodejs/node Conversation
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This only increases performance for deprecated legacy usage of the MakeCallback API (namely the one in which addons do not implement proper async tracking) – that seems like a bad idea, tbh.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What’s the harm though? I don’t have any use for the async context in my use case and the performance boost is kind of nice. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ronag I mean ... it's more of a general principle that deprecated features a) should not add complexity to the code when avoidable and b) should not look like supported or encouraged use cases.
That might be true, but it seems like that's specific to your use case? Authors of addons cannot know whether their consumers use async tracking functionality or not (unless they are the same people, i.e. private addons, I guess), and Node.js has made it fairly clear that async tracking is a feature that the platform provides and that addons should support. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@addaleax, You listed the political arguments. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
She made the argument from the point of view of maintainability.
Maybe I'm misunderstanding something but I took her argument to be the opposite: No cost should be incurred by the project maintainers to improve performance of deprecated features. That seems like a reasonable position for someone to take. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That graph is comparing Node.js versions, and doesn't show what was actually being benchmarked. Unfortunately, that is not meaningful as data here. And to say "everyone pays, without this patch" is misleadingly worded -- if there is a performance penalty without this patch (and I would assume there is because I assume that @ronag has benchmarked this), it is payed by people who use addons that use Node.js functionality in a deprecated way, not by everyone. (And to be clear, this is not general opposition to performance improvements regarding |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@trevnorris did detailed benchmark of MakeCallback, does this count? https://gist.github.com/trevnorris/35c8e570c3097f58739b84bfa3f0a390 Which happens to match up exactly with Addon benchmark request per second / echos per second Hopefully the trend has not continued downward, I have not done recent benchmark |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@e3dio To be clear: What’s missing isn’t valid benchmarking data, it’s relevant benchmarking data. Of course it “counts” as valid benchmarking results; but it’s only data that can be taken to say “there is a performance issue”. It’s not data that can be taken to say “this PR meaningfully addresses that issue”. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Opened #41331, which also removes the overhead of pushing/popping async context, and does so in a way that actually benefits all users of |
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.