Skip to content
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

Really poor performance with Firefox #920

Closed
ekaradon opened this issue Oct 17, 2016 · 7 comments
Closed

Really poor performance with Firefox #920

ekaradon opened this issue Oct 17, 2016 · 7 comments
Milestone

Comments

@ekaradon
Copy link
Contributor

Description

I really like this tool and I use it for all my current projects. I have however a major trouble.
Indeed, when using Firefox with the debugger opened, it just become really slow and it may even freeze as soon as the project fatten.
For example, here with the default project, not even changed:
spectacle j13867
On this test, I have lost the control of my browser for more than 2 seconds!

Expected behavior

Using Chromium or Firefox should not have a major impact on the performance.

Actual behavior

Using Firefox debugging tools is impossible with the react-app-cli solution.
With my previous tools and the same level of features, it was totally usable.

Environment

➜  demo npm ls react-scripts
demo@0.1.0 /home/ekaradon/projects/comwatt/demo
└── react-scripts@0.6.1 
➜  demo node -v
v6.8.1
➜  demo npm -v
3.10.8
➜  demo uname -a
Linux das_computer 4.7.6-1-ARCH #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 x86_64 GNU/Linux
➜  demo firefox -v
Mozilla Firefox 49.0.1
➜  demo cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
➜  demo cat /proc/meminfo 
MemTotal:       16330532 kB
MemFree:         1327896 kB
MemAvailable:    8083516 kB
Buffers:          275356 kB
Cached:          7654904 kB

Reproducible Demo

It is fully reproducible with the standard app created by create-react-app tool.
You just have then to start the application with:
➜ demo npm start
And then, inside Firefox, open the debugging tools (F12) and refresh the page (F5) and watch how much times it get you to have the page displayed.

Cheers,

@gaearon
Copy link
Contributor

gaearon commented Oct 18, 2016

Likely due to debug: 'eval'. Since people prefer sourcemaps anyway I guess we’ll switch.
Can you try making this change inside node_modules/react-scripts/config/webpack.config.dev.js, restart the server, and check if it fixes the issue?

@ekaradon
Copy link
Contributor Author

Hell yeah! It works perfectly now. Thanks for your reactivity!

See here with the default project:
spectacle n13153

And here with a big project (which was loading for more than one minute before this change):
spectacle m13153

Is it possible to integrate this change as default in your release?

@gaearon
Copy link
Contributor

gaearon commented Oct 18, 2016

Could you send a PR?

@ekaradon
Copy link
Contributor Author

Hmmm. Ok. Not sure if there is anything more to change? But I will do it.

@gaearon
Copy link
Contributor

gaearon commented Oct 18, 2016

Probably nothing else.

@ekaradon
Copy link
Contributor Author

@gaearon: Done. Thank you again for the help!

@gaearon
Copy link
Contributor

gaearon commented Nov 20, 2016

Fixed via #924, will be out in 0.8.0.

@gaearon gaearon closed this as completed Nov 20, 2016
@gaearon gaearon added this to the 0.8.0 milestone Nov 20, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants