Find out and solve what is slowing UmpleOnline loading .. may be joint.js #949

Open
TimLethbridge opened this Issue Jan 15, 2017 · 4 comments

Projects

None yet

3 participants

@TimLethbridge
Member

Umpleonline is loading a lot slower than it used to. It seems that joint.js is a particularly large file being loaded in _load.js and may be the culprit. We need to experiment with loading this only 'on demand' when a request is first made for joint diagrams, and/or minimizing it.

@jblang94
Contributor

I thought that I'd share the following in case it helps with diagnosing this issue. I experienced a slow UmpleOnline load while I was working at home today, and confirmed that my internet connection was not the cause. As the page was loading, I opened the "Networking" tab in Google Chrome's "Developer Tools". After sorting the files by their processing time, I saw that "backbone.js" took the longest. I've attached a screen shot with this result.

slow_umpleonline_load

@Nava2
Member
Nava2 commented Jan 30, 2017 edited

@jblang94 I disagree with your diagnosis.

The issue is more likely due to the fact that the browser immediately tries to download 80 files. Browsers more often now will try to do all of these concurrently. The server is also probably having load spikes, I'd be curious to see what the server's top output looks like when someone loads the page with no cache in use. I think it's just getting overloaded.

Possible solutions, though: the _load.js file is slightly concerning, but I think there needs to be some consolidating and minification of the JS files to make them into a single vendor.js. In the node world, we'd use something like Webpack with UglifyJS2 doing the minification.

Getting that into the current build chain is... awful. What wouldn't be overly difficult is using <concat> to create a "monolithic" dependency instead of 75+ small JS files. The order of loading does unfortunately matter, so that'll have to be maintained when building a solution like that. Additionally, providing everything as gzip might be a good idea, as well. But that takes some server software installs.

@jblang94
Contributor

@Nava2 thanks for your comment

@TimLethbridge
Member

@jblang94 - I noticed the slowdown when we added joint js in the fall, so this confirms it. My suggestion is to find a way to not load the jjs javascript, and then to test and load only when needed.

But also minifying the file would be advantageous too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment