netcreateorg / netcreate-2018

Please report bugs, problems, ideas in the project Issues page: https://github.com/netcreateorg/netcreate-2018/issues
Other
11 stars 2 forks source link

Errors when the network is super slow #136

Closed jdanish closed 3 years ago

jdanish commented 4 years ago

If I run with chrome set to simulate a slow phone connection I get a blank screen on the load about 1/2 of the time (almost always if I multi-task to a different window while it is loading). Occasionally there is an error displayed, but otherwise we see the attached blank screen. Not sure if this is related to the other issue I reported.

Screen Shot 2020-09-07 at 12 44 14 PM Screen Shot 2020-09-07 at 12 35 38 PM
benloh commented 4 years ago

@jdanish A few questions:

  1. This looks like it's not standalone mode right?
  2. Can you open up the Network panel and see if any file loading has been stalled?
  3. Given the sourcemap errors, I'm assuming this is running the net-debug branch? Are you seeing netc-lib being compressed?

132 did point us at a few issues where asynchronous loads was biting us in the ass. That explains the intermittent nature of the problem. I wouldn't be surprised if there's another issue similar to that. We just need to be able to reproduce it to know where to look.

benloh commented 4 years ago

OK I just hit the page, and it looks like netc-lib is not compressed, so perhaps it's running an earlier commit?

Also, I'm curious if running this with #132 issue fix will help? This looks like a similar issue.

jdanish commented 4 years ago

Which page? I am at http://134.209.73.52/graph/H213FA2020Prokopios/#/

And netc is 1 mb and change (compressed)

Screen Shot 2020-09-07 at 1 26 49 PM
jdanish commented 4 years ago

I swear it crashed at least once (and I got that photo) but of course now it is no-longer crashing. But it seems to take as long as a minute to load the graph even after transferring netc, so it is quite possible students are just giving up?

benloh commented 4 years ago

I'm at http://134.209.73.52/graph/H213FA2020Prokopios/#/ Oh! I misread the Safari output. The size is 5.15MB, but the transferred size is indeed 1.1MB. I did get a Server disconnect though.

We might have to do some auditing to see what the script is doing.

Is this related to the size of the graph? Or do they have similar issues with smaller graphs?

benloh commented 4 years ago

It does look like the websocket is taking a long time to load. Are there a lot of open graphs on this machine?

screenshot_803
jdanish commented 4 years ago

The server only has 2 open graphs (you can check - default password is still set for testing).

On my machine I’ve closed all of the other graphs.

Joshua

jdanish commented 4 years ago

I don't know that the students ever saw a smaller graph in this class. I have a much smaller graph in my class (CHAT: http://134.209.73.52/graph/CHAT/#/) and have had no problems for me or reported, but with only 8 grad students ... not sure what if anything that might mean.

jdanish commented 4 years ago

Here is the database for the large file

H213FA2020Prokopios.zip

benloh commented 4 years ago

@jdanish It seems that I am unable to reproduce the error with the current server even with "Low-end mobile" throttling.

I did do some local testing with throttling and there are a few things we can improve.

There are basically two main factors affecting the page load: 1) network load time, and 2) script performance running/rendering time.

By far the biggest delay is the load time for the page. Even with GZIP compression on, with throttling on (emulating low-end 3G), it takes about 42 seconds to load and render the page. Of that, about 32 seconds is simply loading all of the file assets over the network, and about 10 seconds is script running/rendering time.

The biggest culprit is netc-lib.js, which at 1.2MB takes 30 seconds to simply download. The next biggest file is netc-app.js at a mere 145k.

I tried a few quick optimization strategies:

Recommendations

Given that, it sounds like there are some quick and simple things we can do:

  1. Turn off font awesome fonts -- two seconds isn't huge, but unless there's a really compelling reason to use load the web fonts, removing them will keep the load more efficient for mobile users.

  2. Hide Node and Edge Tables by default -- This is fairly easy to implement and can speed up the initial rendering by about 2.5 seconds.

  3. See if we can throw up an initial loading page so the user isn't staring at a blank screen during the load. We probably can't easily do a real progress bar, but a message is better than nothing.

  4. GA seems important enough to you, and the performance impact is minimal enough that it seems like we should leave it alone.

Other things to look into


It's worth noting that the GZipped version has not been tested with students yet, so some of these problems may have already been addressed.

What do you think? Should we pursue some simple fixes?

jdanish commented 4 years ago

Awesome. Yeah why don’t we start with removing font awesome, a loading image, and not rendering the tables until we need them? I believe font awesome was added for the i and ? Icons so am sure those could instead come from google or something else?

benloh commented 3 years ago

Implemented with #129.