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 — timers: use ref counts to count timers by RaisinTen · Pull Request #41231 · nodejs/node Conversation
|
|
Review requested:
|
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.
|
The benchmark results look very similar to the results of the revert PR - #41298. I think we should go ahead with this change because the slowdown in |
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.
I left some comments but honestly they're all superfluous because this and the original PR are both doing entirely too much work. Both Timer & Immediate already do their own book-keeping in JS-land for the number of active objects. You just need to export a function that returns refCount & immediateInfo[kRefCount] from internal/timers.js.
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.
The additional objects that were getting added and deleted from the activeTimersMap object were slowing down the rest of the timers code, so this change falls back to using the ref counts to count the active timers inside process.getActiveResourcesInfo(). Fixes: nodejs#41219 Signed-off-by: Darshan Sen <[email protected]>
157ced8 to
4446606
Compare
timerListMap and outstandingQueue to count timers|
@apapirovski thanks for the review! I've updated the PR to use refCount and immediateInfo[kRefCount] to count the timers, PTAL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Timers benchmark CI: https://ci.nodejs.org/job/benchmark-node-micro-benchmarks/1080/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
Looks good. Thanks for making the change!
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.
Benchmark results look impressive 👏
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 64cc066 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The additional objects that were getting added and deleted from the activeTimersMap object were slowing down the rest of the timers code, so this change falls back to using the ref counts to count the active timers inside process.getActiveResourcesInfo(). Fixes: #41219 Signed-off-by: Darshan Sen <[email protected]> PR-URL: #41231 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The additional objects that were getting added and deleted from the activeTimersMap object were slowing down the rest of the timers code, so this change falls back to using the ref counts to count the active timers inside process.getActiveResourcesInfo(). Fixes: #41219 Signed-off-by: Darshan Sen <[email protected]> PR-URL: #41231 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The additional objects that were getting added and deleted from the activeTimersMap object were slowing down the rest of the timers code, so this change falls back to using the ref counts to count the active timers inside process.getActiveResourcesInfo(). Fixes: #41219 Signed-off-by: Darshan Sen <[email protected]> PR-URL: #41231 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
timers: recent performance regressions
There was an error while loading. Please reload this page.