Very slow recompile times (~20 seconds)
See original GitHub issueDescribe the bug
(Write your answer here.)
Hi, I’m trying to upgrade from 3.4.1 to 4.0.0 but I noticed that when I make a change it takes approx 20 seconds to recompile. With 3.4.1 it’s just a couple of seconds.
Did you try recovering your dependencies?
I deleted node_modules, yarn.lock, and installed the deps.
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Slow, compile time, recompile.
Environment
Environment Info:
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
Binaries:
Node: 14.5.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Browsers:
Chrome: 86.0.4240.111
Firefox: 81.0
Safari: 14.0
npmPackages:
react: ^17.0.1 => 17.0.1 (16.14.0)
react-dom: ^17.0.1 => 17.0.1 (16.14.0)
react-scripts: ^4.0.0 => 4.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
yarn start
- change a file
- observe the time it spends on “Compiling…”
Expected behavior
The recompile time should be almost instantaneous. It also takes a lot of time to start the first time (after yarn start
)
Actual behavior
(Write what happened. Please add screenshots!) The app takes 20 seconds to recompile.
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.) Not available, I think it’s related to the size of my app (It’s 1012 files)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:124
- Comments:78 (7 by maintainers)
Top Results From Across the Web
C++ is too slow to compile, can you share all your tips to lower ...
Out-of-control headers is number 1 slow compile times reason ive seen on projects. Another good one is to use precompiled headers.
Read more >Why does C++ compilation take so long? - Stack Overflow
Compile time dropped from 3 hours to 7 minutes. Share. Share a link to this answer ... The STL is slow and most...
Read more >Slow compilation - Google Groups
And the good news: when I mocked only the functions that are actually called, compile times dropped to 20 seconds. Now, the only...
Read more >Compiling takes really long time - C++ - Unreal Engine Forums
guys does anybody know why compiling times are so high in visual studio while i watch other people and it usually takes 20...
Read more >How to speed up compile time? - C++ Forum
Are there good practices to improve compile times? ... it cut my compile times down from 20-30 seconds per cpp file to 1-2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a way to completely remove ESLint from the dev compilation process? I believe many developers use ESLint as an IDE extension, so why do we need to duplicate it in react-scripts? I mean, every time developer saves a file, both IDE and react-scripts trigger their own ESLint process.
For me, it would be useful to run the lint command explicitly only in two situations: before a commit (
lint-staged
) and before a build (react-scripts
).It’s because of the new
threads
implementation fromeslint-webpack-plugin
: https://github.com/webpack-contrib/eslint-webpack-plugin/issues/52#issuecomment-735684551Reverting back to
2.3.0
should temporarily fix the issue. That can easily be done by adding at the end ofpackage.json
:and
yarn
again. Re-compile time should be back to normal