Repository navigation
timers: recent performance regressions #41219
Copy link
Copy link
Closed
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.regressionIssues related to regressions.Issues related to regressions.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
Description
Activity
- addedtimersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.regressionIssues related to regressions.Issues related to regressions.
on Dec 17, 2021 To mitigate this, we can traverse
for the Timeouts andLine 161 in c8f5dd6
const timerListMap = ObjectCreate(null); for the Immediates. That way, we wouldn't have to run any extra code when the timers are added/removed. The results are going to be a little less accurate because these objects aren't updated at the right moment always (which is why I didn't do it that way in #40813) but we can always fix that in a separate PR.Line 426 in c8f5dd6
const outstandingQueue = new ImmediateList(); PR: #41231
we can always fix that in a separate PR
And if we can't fix it, we can always just leave it documented as an API limitation.
Reacted by Darshan Sen- added a commit that references this issue
on Dec 31, 2021 - added a commit that references this issue
on Jan 2, 2022 - added a commit that references this issue
on Jan 14, 2022 - added a commit that references this issue
on Jan 31, 2022 - added a commit that references this issue
on Feb 1, 2022
Metadata
Metadata
Assignees
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.regressionIssues related to regressions.Issues related to regressions.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
0d9f3bd introduced a noticeable performance regression with various timers benchmarks. For example:
timers/immediate.js type="clear"performance dropped 77%timers/timers-cancel-pooled.jsperformance dropped 55%timers/timers-timeout-pooled.jsperformance dropped 41%and many other timers benchmarks/benchmark configs saw double digit drops.
While having a public "get active requests"/"get active handles" API would be nice, I don't think it is worth this kind of penalty if we can't find some way to remedy the performance regressions.
/cc @RaisinTen