Skip to content

Conversation

@gurgunday
Copy link
Member

Does the same optimization as #59873 for queueMicrotask

branch:

./node benchmark/run.js --filter queue-microtask process

process/queue-microtask-breadth.js
process/queue-microtask-breadth.js n=400000: 18,938,347.488090977

process/queue-microtask-depth.js
process/queue-microtask-depth.js n=1200000: 35,862,646.06556887

main

./node benchmark/run.js --filter queue-microtask process

process/queue-microtask-breadth.js
process/queue-microtask-breadth.js n=400000: 5,198,220.087856157

process/queue-microtask-depth.js
process/queue-microtask-depth.js n=1200000: 12,707,696.847598467

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Nov 30, 2025
@gurgunday gurgunday added the performance Issues and PRs related to the performance of Node.js. label Nov 30, 2025
@gurgunday gurgunday force-pushed the feat/optimize-enqueue branch from ae950e3 to a6615a8 Compare November 30, 2025 20:20
@gurgunday gurgunday changed the title process: stream: preserve AsyncLocalStorage on queueMicrotask only when needed process: preserve AsyncLocalStorage on queueMicrotask only when needed Nov 30, 2025
@gurgunday gurgunday force-pushed the feat/optimize-enqueue branch from a6615a8 to 2f8776e Compare November 30, 2025 20:27
@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.58%. Comparing base (6274eb7) to head (2f8776e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60913      +/-   ##
==========================================
+ Coverage   88.55%   88.58%   +0.02%     
==========================================
  Files         703      703              
  Lines      208291   208296       +5     
  Branches    40170    40166       -4     
==========================================
+ Hits       184443   184509      +66     
+ Misses      15874    15807      -67     
- Partials     7974     7980       +6     
Files with missing lines Coverage Δ
lib/internal/process/task_queues.js 100.00% <100.00%> (ø)

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants