Reputation: 209
I've recently noticed my build time has increased considerably, sometimes taking a full minute to load. On the console I still see "Building JavaScript bundle: finished" fairly quickly but the screen takes much longer to refresh. Is there a reason something like this would be happening?
Upvotes: 9
Views: 25367
Reputation: 5065
I was going through the same problem.
I used expo on multiple devices and clearly it depends on the device also, i.e, whether it is able to handle it or not.
Second, for the slow device, i came up with a solution.
I just turned off the fast Refresh
.
Fast Refresh
keeps a watch on the development side and keeps reloading whenever we make a change.
By deactivating it, we need to refresh the app on our own. But this helped me.
Due to multiple refreshes and continuous bundling, expo gets slow (as per me) thus disabling this feature may help (infact helped me a lot).
STEPS TO DO THAT;
In your expo go app, shake your device. An option panel will open.
There will be an option to disable fast refresh
. Simply click that and you are done.
Upvotes: 0
Reputation: 527
Try using Expo in a Simulator on your development machine and determine if it is taking as long as on your device:
Upvotes: 12
Reputation: 19
If the connection is made but bundle building is very slow - Try disconnecting from the network both devices, the system and the mobile, and reconnect. Also, don't forget to clear the 'recently in development' projects and start the project again. It will certainly increase the speed of building by far, especially for windows it works very well.
Upvotes: 1
Reputation: 493
In my case, it was a different solution.
I followed the instructions given by jimmylee on the Expo SDK forums, which say:
If you are behind a VPN, try disabling the VPN.
If you are using windows 10, run CMD on your machine and type ipconfig. Take a look at the first Ethernet Adapter. If it doesn’t say Ethernet Adapter Ethernet it means Expo is taking the IP address of something else.
To fix this, go to network connections and disable the adapter that it should not be pointing at.
Connect your computer to the network and your phone to the same network. Restart Expo.
So, go to Settings > Network & Internet.
Click Change Adapter Options:
Then disable the unneeded Ethernet:
Then restart Expo.
Upvotes: 3