react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Simulator live reload making computer CPU run at 150+%

Open jamesone opened this issue 10 years ago • 6 comments

I came across this issue a while ago and never quite found out why my cpu was running at 150+% when my app was running.

Today I found out that it was because the live reload was enabled on my simulator. When I enabled live reload my CPU jumps straight to 150+% and stays there until I disable live reload.

Something I should add is that my live reload never worked...I never assumed that it was causing my cpu to run hot so I just left it on. Maybe my live reload not working has something to do with my cpu running hot.

Here's a stack trace that was found in my chrome debugger:

WebSocket connection to 'ws://localhost:5678/socketcluster/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

l {name: "SocketProtocolError", message: "Socket hung up", code: 1006}
code: 1006
message: "Socket hung up"
name: "SocketProtocolError"

Has anyone found a fix to this issue or at least came across it?

jamesone avatar Apr 01 '16 00:04 jamesone

Yep - I get this too. screen shot 2016-05-21 at 7 44 30 pm

phil-travelbytes avatar May 21 '16 09:05 phil-travelbytes

https://github.com/SocketCluster/socketcluster/issues/184

The SocketProtocolError: Socket hung up warning shouldn't cause problems and is generally safe to ignore.

You can change the logLevel option on the server to 1 and that should hide 'warnings'. Or you could even set the logLevel to 0 and log all the errors and warnings yourself using the SocketCluster master object's error and warning events (so you can be more selective about which ones to show).

sattaman avatar Aug 03 '16 11:08 sattaman

@facebook-github-bot label Icebox

charpeni avatar Nov 16 '16 01:11 charpeni

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/simulator-live-reload-making-computer-cpu-run-at-150

ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

charpeni avatar Nov 16 '16 01:11 charpeni

@facebook-github-bot close

charpeni avatar Nov 16 '16 01:11 charpeni

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

facebook-github-bot avatar Nov 16 '16 01:11 facebook-github-bot