Improve TBT on file source view
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 |
![]() |
![]() |
UX Impact
No visual changes are expected from this change.
How to set up and validate locally
Visual
- View a large source file
Sitespeed results
- Install Docker (if not already installed)
- Run the project (preferably in a separate environment like GitPod)
- Run
gdk measure <url-to-large-file>
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #328221 (closed)
Edited by Jacques Erasmus