mu-zero-HYPERLOOP / canzero

Control Panel of Mu-Zero Hyperloop Season 4
https://mu-zero.de
6 stars 0 forks source link

Bad performance on startup. #61

Closed NiklasHeneka closed 8 months ago

NiklasHeneka commented 8 months ago

Starting the app currently takes several minutes. It seems it's trying to connect to http://100.123.16.144:8097/ and receives a timeout after some time which slows down the app.

NiklasHeneka commented 8 months ago

@kistenklaus

kistenklaus commented 8 months ago

will take a look at it. Any idea since when this is the case?

NiklasHeneka commented 8 months ago

It's interesting because at home the timeout happens very fast so the startup is only slowed down a little. However at KIT this takes much longer. The issue comes with Pretty pretty graphs comit in the index.html file. This might also be the reason for a slow start in general.

kistenklaus commented 8 months ago

http://100.123.16.144:8097/ is the react-devtools debug server super weird bug i removed it because it is only required for performance debugging.

Also i don't have any problems on my PC and it only happend for me on my laptop, where i also have installed the react-devtools. Anyway can you check if 7380974 fixes it?

kistenklaus commented 8 months ago

you could also check if

<script src="http://localhost:8097"></script>

works without major performance impact. Just out of interst

kistenklaus commented 8 months ago

https://github.com/facebook/react/tree/main/packages/react-devtools#usage-with-react-dom

if your interessted in what react-devtools is. It is very useful for debugging frame times and finding the slowest components

NiklasHeneka commented 8 months ago

Yes 7380974 fixes it. With <script src="http://localhost:8097"></script> I still get a connection error in the JS console but the startup is still much faster.