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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 39 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
Copy link
Collaborator

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. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants