Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workers: refactor stdio to improve performance #56630

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

mcollina
Copy link
Member

While I fixed #56428, I've found that we could do quite a bit of refactoring and simplifying the sdtio in workers and remove code that is not really necessary anymore.

This PR also changes from map and forEach to use basic array operations because those can be hot paths, and therefore we can actually avoid a bottleneck.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. worker Issues and PRs related to Worker support. labels Jan 16, 2025
@mcollina mcollina force-pushed the worker_stdio_refactor branch from 159cd0d to f0c9885 Compare January 16, 2025 17:12
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.20%. Comparing base (f4fcf0e) to head (f0c9885).
Report is 68 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56630      +/-   ##
==========================================
+ Coverage   89.19%   89.20%   +0.01%     
==========================================
  Files         662      662              
  Lines      191762   191904     +142     
  Branches    36907    36931      +24     
==========================================
+ Hits       171041   171192     +151     
+ Misses      13572    13556      -16     
- Partials     7149     7156       +7     
Files with missing lines Coverage Δ
lib/internal/worker.js 99.81% <100.00%> (+<0.01%) ⬆️
lib/internal/worker/io.js 99.19% <100.00%> (+0.01%) ⬆️

... and 63 files with indirect coverage changes

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 17, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 17, 2025
@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 19, 2025
@nodejs-github-bot
Copy link
Collaborator

@mcollina mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 23, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 23, 2025
@nodejs-github-bot nodejs-github-bot merged commit d978610 into nodejs:main Jan 23, 2025
65 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in d978610

aduh95 pushed a commit that referenced this pull request Jan 27, 2025
Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #56630
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 pushed a commit that referenced this pull request Jan 30, 2025
Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #56630
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants