Skip to content

Improve performance of chunk naming collision check#4643

Merged
lukastaegert merged 2 commits intomasterfrom
gh-4642-faster-chunk-collision-check
Sep 22, 2022
Merged

Improve performance of chunk naming collision check#4643
lukastaegert merged 2 commits intomasterfrom
gh-4642-faster-chunk-collision-check

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

When creating many chunks (> 1000), the name collision check for case-insensitive file systems was exploding, leading to terrible performance. This is solved by using a proxy to build a lower-case looking table for file names as the bundle is created.

@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #4643 (04bd4f9) into master (71d20c9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4643   +/-   ##
=======================================
  Coverage   98.87%   98.87%           
=======================================
  Files         210      211    +1     
  Lines        7373     7384   +11     
  Branches     2106     2107    +1     
=======================================
+ Hits         7290     7301   +11     
  Misses         27       27           
  Partials       56       56           
Impacted Files Coverage Δ
src/utils/PluginDriver.ts 100.00% <ø> (ø)
src/Bundle.ts 100.00% <100.00%> (ø)
src/Chunk.ts 100.00% <100.00%> (ø)
src/rollup/rollup.ts 100.00% <100.00%> (ø)
src/utils/FileEmitter.ts 100.00% <100.00%> (ø)
src/utils/outputBundle.ts 100.00% <100.00%> (ø)
src/utils/renderNamePattern.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert lukastaegert force-pushed the master branch 4 times, most recently from f47ff14 to 6ce8096 Compare September 21, 2022 18:57
@lukastaegert lukastaegert force-pushed the gh-4642-faster-chunk-collision-check branch from 7d79b2f to 8019a3a Compare September 21, 2022 18:57
@github-actions
Copy link

github-actions bot commented Sep 21, 2022

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4642-faster-chunk-collision-check

or load it into the REPL:
https://rollupjs.org/repl/?pr=4643

@lukastaegert lukastaegert force-pushed the gh-4642-faster-chunk-collision-check branch from 6709adf to 9fee6ab Compare September 21, 2022 20:08
@lukastaegert lukastaegert merged commit 7836357 into master Sep 22, 2022
@lukastaegert lukastaegert deleted the gh-4642-faster-chunk-collision-check branch September 22, 2022 04:18
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.

Terrible slow builds when more than 1000 files in a module

1 participant