Skip to content

Slower compile time in CRA 4.0. #9966

Closed
@raRaRa

Description

@raRaRa

I was wondering if I should write a bug report or not, as this could be by design or side effect with Fast Refresh. But I'll leave this as a question for now.

After I upgraded to CRA version 4.0, I noticed that the compile time has increased quite significantly for me, or at least enough for me to clearly notice it. Before Fast Refresh, my app would compile quicker and refresh almost simultaneously when I saved a code change.

What I've already tried to decrease the compile time after upgrading to 4.0:

  1. Deleted the node_modules folder, yarn.lock and then installed.
  2. Bought a new XPS laptop (upgraded from 7th gen i7 to 10th gen i7 Intel processor). Fresh start, faster laptop, more memory, but still slower compile time.

What could cause it:

  • My app is huge. I have very complex Redux state, hundreds of components, etc.
  • I'm running Windows 10

At the moment I'd prefer disabling Fast Refresh in favour of faster compile time, if this is by design. Again, I'm not sure if this is by design or a side effect because of Fast Refresh, but if you need more information from me, or if you want me to try something out, then please comment!

Thanks!

Activity

mathiaswillburger

mathiaswillburger commented on Oct 30, 2020

@mathiaswillburger

Confirming the same issue. I upgraded yesterday and the compilation takes significantly longer.
Actually, it seems that it is stuck somewhere in the beginning for some time before even doing something and then the rest of the build process runs as usual.

jeggy

jeggy commented on Oct 31, 2020

@jeggy

Same here, for my relatively big project it went from a average of about 1.3 seconds to 24.8 seconds.

RealDrewKlayman

RealDrewKlayman commented on Oct 31, 2020

@RealDrewKlayman

Same problem over here. It takes around 20-40 seconds longer now.

gastonmorixe

gastonmorixe commented on Oct 31, 2020

@gastonmorixe

Same. I didn't measure but every change before was almost instant and now takes more than 10 seconds if not close to 30s.

zerodouglas

zerodouglas commented on Oct 31, 2020

@zerodouglas

I have the same problem here, even for a small project.

mpeteffi

mpeteffi commented on Oct 31, 2020

@mpeteffi

It was resolved here: #9886 (comment)

thomasleduc

thomasleduc commented on Nov 1, 2020

@thomasleduc

Yes, it is solved in this commit ceeb654 and will be ship with the next version.

PraveenVerma17

PraveenVerma17 commented on Nov 1, 2020

@PraveenVerma17

@thomasleduc when are you planning to create new version ?

mareksuscak

mareksuscak commented on Nov 2, 2020

@mareksuscak
Contributor

Here's a workaround that you can apply for the time being: #9930 (comment)

a-tonchev

a-tonchev commented on Nov 3, 2020

@a-tonchev

Same here

24 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jeggy@mareksuscak@gastonmorixe@jwchang0206@thomasleduc

        Issue actions

          Slower compile time in CRA 4.0. · Issue #9966 · facebook/create-react-app