Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39,511
    • Issues 39,511
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,221
    • Merge requests 1,221
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !38052

You need to sign in or sign up before continuing.
Merged
Created Jul 28, 2020 by Tim Zallmann@timzallmannMaintainer0 of 13 tasks completed0/13 tasks

Startup.CSS

  • Overview 45
  • Commits 8
  • Pipelines 11
  • Changes 7

What does this MR do?

Test for running startup.css/critical CSS inline to improve performance. The actual CSS is automatically extracted and copied over into the GitLab repo (Interim Solution). Target is to have in the critical CSS all CSS for already rendering the top + left menu while the main application.css is loaded.

Currently the application.css has an content size of 1.4MB which need to be parsed and the inlined CSS extracts the minimum which is in the first test around 32KB that is needed to render.

This is now a test version "hidden" behind a querystring parameter (so we can test side by side the same pages) and a cookie to test global navigating with it activated.

Activation by adding ?startup_css=true to any page or setting a cookie startup_css with the value true.

It is very hard to test locally, and we still need to figure out if this really improves performance with our current setup or not (as it adds 32KB to every basic page load). Especially in non cache situations I saw big improvements for the First Paint, see below, which is one of the main things for sitespeed and other statistics especially search engines, etc.

Screenshots

Bildschirmfoto_2020-07-28_um_12.53.01

Local Sitespeed runs

Left is current rendering and on the right with startup_css activated.

Bildschirmfoto_2020-07-29_um_21.38.23

Bildschirmfoto_2020-07-30_um_16.45.31

Does this MR meet the acceptance criteria?

Conformity

  • Changelog entry
  • Documentation (if required)
  • Code review guidelines
  • Merge request performance guidelines
  • Style guides
  • Database guides
  • Separation of EE specific content

Availability and Testing

  • Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
  • Tested in all supported browsers
  • Informed Infrastructure department of a default or new setting change, if applicable per definition of done

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited Jul 30, 2020 by Tim Zallmann
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: tz-critical-css-poc

Enable Gitpod?

To use Gitpod you must first enable the feature in the integrations section of your user preferences.

Cancel Enable Gitpod