Skip to content

Remove limit on max parallel file ops #5986

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

Merged
merged 2 commits into from
Jun 19, 2025

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

If we hit this limit for this.load calls, it leads to a very unpleasant "hanging" situation for users.

Copy link

vercel bot commented Jun 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 5:01am

Copy link

github-actions bot commented Jun 15, 2025

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-5848_remove_file_ops_limit

Notice: Ensure you have installed the latest stable Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.

or load it into the REPL:
https://rollup-dc32alhjk-rollup-js.vercel.app/repl/?pr=5986

Copy link

github-actions bot commented Jun 15, 2025

Performance report

  • BUILD: 6915ms (-275ms, -3.8%), 830 MB (+9%)
    • initialize: 0ms, 24.6 MB
    • generate module graph: 2548ms (-174ms, -6.4%), 629 MB (+10%)
      • generate ast: 1390ms (+181ms, +15.0%), 623 MB (+11%)
    • sort and bind modules: 393ms (-30ms, -7.2%), 680 MB (+11%)
    • mark included statements: 3981ms, 830 MB (+9%)
      • treeshaking pass 1: 2319ms, 813 MB (+6%)
      • treeshaking pass 2: 469ms, 837 MB (+7%)
      • treeshaking pass 3: 404ms, 823 MB (+8%)
      • treeshaking pass 4: 393ms, 842 MB (+7%)
      • treeshaking pass 5: 391ms, 830 MB (+9%)
  • GENERATE: 892ms (+193ms, +27.7%), 927 MB (-8%)
    • initialize render: 0ms, 842 MB (-5%)
    • generate chunks: 145ms (+91ms, +169.6%), 838 MB (-7%)
      • optimize chunks: 0ms, 855 MB (-4%)
    • render chunks: 649ms (+26ms, +4.2%), 901 MB (-7%)
    • transform chunks: 19ms, 927 MB (-8%)
    • generate bundle: 0ms, 927 MB (-8%)

Copy link

codecov bot commented Jun 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.78%. Comparing base (5dcce11) to head (1556285).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5986      +/-   ##
==========================================
- Coverage   98.78%   98.78%   -0.01%     
==========================================
  Files         270      270              
  Lines        8735     8734       -1     
  Branches     1510     1510              
==========================================
- Hits         8629     8628       -1     
  Misses         73       73              
  Partials       33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@lukastaegert lukastaegert added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@lukastaegert lukastaegert added this pull request to the merge queue Jun 19, 2025
Merged via the queue into master with commit 0b3e6bf Jun 19, 2025
42 checks passed
@lukastaegert lukastaegert deleted the gh-5848_remove_file_ops_limit branch June 19, 2025 05:43
Copy link

This PR has been released as part of rollup@4.44.0. You can test it via npm install rollup.

@rwv
Copy link

rwv commented Jun 23, 2025

Hi @lukastaegert,

I’m currently encountering an EMFILE: too many open files error during builds both on Windows and on macOS, which seems related to the file resolver. I noticed this PR removes the limit on max parallel file operations, so I suspect it might be connected.

Here’s an example error log (paths simplified):

error during build:
[commonjs--resolver] Could not load some.js: EMFILE: too many open files
    at async open (node:internal/fs/promises:639:25)
    at async Object.readFile (node:internal/fs/promises:1246:14)
    at async Object.handler (.../node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:45843:27)
    at async PluginDriver.hookFirstAndGetPlugin (.../node_modules/rollup/dist/es/shared/node-entry.js:22166:28)
    at async .../node_modules/rollup/dist/es/shared/node-entry.js:21170:33
    at async Queue.work (.../node_modules/rollup/dist/es/shared/node-entry.js:22394:32)

I’m still investigating on my side but wanted to share this in case it helps track related issues.

Thanks so much for your work on Rollup! 🙏

Package:
vite: 6.3.5
rollup: 4.44.0

@rwv
Copy link

rwv commented Jun 23, 2025

I downgraded Rollup to 4.43.0 and the EMFILE issue is gone. I’ll open a new issue with more details shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The build does not fail and stalls if the load hook is called concurrently more than maxParallelFileOps in watch mode
3 participants