by rkwasny · 9y ago · 0 comments
"On GitLab, our pages would load an average of 20kb on each page load versus the full JavaScript file size of 800kb+."
What exatly takes 800kb? I don't see a 3d animation/game on every gitlab page...
IMHO the solution to all this craziness is just generate small mostly-static page quickly and do not have 200 onLoad() functions.
Funny thing, I have built a full fledged production 2d/3d application in JS. It was less complex than what GL has to do, and it was 670kb fully minified and obfuscated. We are constantly looking for ways at GL to make our file size smaller and our JS faster. It is something we are actively putting our time towards.
When I refresh the GitLab sign-in page in Chromium, I see that the initial page load takes 40ms to parse css, 250ms to parse and execute js, and then another 70ms after DOMContentLoaded. This is with a warm cache. It's not unreasonable to think that turbolinks might save about 300ms on page loads, which is a respectable performance boost.
It comes with it's own drawbacks though.