-
Notifications
You must be signed in to change notification settings - Fork 507
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
Very slow builds with many files #215
Comments
instead of a |
Hm I guess I could look at it more closely next week. Haven't used |
its really good. basically gold standard for logging in cli's. |
Cool stuff. I'll look into it for sure - but what would you expect from a PR? I'd love to use this as a learning opportunity :) hey, perhaps i'll turn it into something fun for this year's react.christmas? 😅 |
you can implement just the logging that you need to dig into your perf issues. once we understand the source of your perf issues then we can make a separate PR to fix that. make sense? |
that'll work :) |
I solved this by using the rollup plugin for svgr instead (per #200), but I'll still have a look at the debugging part. Closing this issue as I won't be working on fixing the "many files, slow build" issue. |
This was also worked on in #243 |
@selbekk - you mind sharing you tsdx rollup config? I'm using the default tsdx config and am getting terribly slow build times. |
I'm no longer working on that particular project, and has lost access to the source code unfortunately. |
Current Behavior
When building a single entry file with ~160 exports (each in their own file), the build process takes several minutes without a warm cache (crashes with an OOM error on CI)
Expected behavior
I'd expect it to be slower than a single module file, but not THAT much slower
Suggested solution(s)
It looks like it's a issue with either rollup or one of its plugins - but I have no way of knowing. Perhaps you've stumbled upon this issue previously?
Also, perhaps a --perf flag could be added to the CLI, to simplify this debugging process for future users?
Additional context
I added a
{ perf: true; }
flag to the rollup config, and console.log-ed out the resultinggetTimings()
call:Here's the output
The "Building modules" stage of the build process takes 47.3 seconds - that's for building the 160 SVGR generated React components (it's an icon library) on my 2.7GHz i7 16GB RAM MacBook Pro.
Your environment
The text was updated successfully, but these errors were encountered: