Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #1684

Closed
Open
Created Oct 12, 2012 by Administrator@rootOwner

(Experiment) Optimize JS loading

Created by: riyad

I was unhappy the way JS was loaded and sprinkled throughout the code, so I sat down and experimented with it a bit and tried to implement some ideas that are generally suggested.

The main thing is putting the JS at the bottom of the page and and scooping up all the sprinkled JS and bundling them together and defer their execution. There is no optimization in the "architecture" of the JS code, just the "pattern" in which they are loaded.

Over in my clone in the optimize-js-loading branch I have implemented that.

You get up to 400ms (generally around 50-100ms) improvements (in production env, with "warm caches"). But aside from "being finished" earlier, the page builds up faster, because rendering is not paused by all those small pieces of JS everywhere. You can see in the screen shots below, the network graph is steeper with the optimizations, which means more things can be/are requested in parallel.

I'd like to know if this is something worthwhile or just a useless gimmick.

In the screen shots the top is the old way and on the bottom you have the optimized loading.

the dashboard: the dashboard

the commits page: the commits page

the files page: the files page

the issues page: the issues page

a merge request: a merge request

Assignee
Assign to
Time tracking