Skip to content

Improve TBT on file source view

Jacques Erasmus requested to merge 328221-improve-tbt-file-source into master

What does this MR do and why?

Currently, when viewing large files the Total Blocking Time (TBT) is around 35s.

This MR intends to reduce the time spent rendering page content by optimizing how the line numbers are rendered.

Results

Average TBT after 4 runs:

  • TBT (avg) = 5.50s
  • TBT Improvement (avg): 552% 🎉

Screenshots or screen recordings

before after
TBT (avg): 35.86s TBT (avg): 5.50s
Screenshot_2021-10-19_at_14.29.09 Screenshot_2021-10-19_at_14.35.03

UX Impact

No visual changes are expected from this change.

How to set up and validate locally

Visual

  1. View a large source file

Sitespeed results

  1. Install Docker (if not already installed)
  2. Run the project (preferably in a separate environment like GitPod)
  3. Run gdk measure <url-to-large-file>
  4. Check the output from gdk measure (Sitespeed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #328221 (closed)

Edited by Jacques Erasmus

Merge request reports