Improve Total Blocking Time performance metric of Merge Request Changes page with large amount of changes

Important

  • This issue is meant to track the impact of the solutions put in place. Will be closed when the TBT metric is within acceptable ranges
  • For a concrete solution we're attempting, see issue #321691 (closed) please

Proposal

Before we shipped the fix to #241841 (closed), this was the result of the MR Changes tab for 10k architecture reference:

NAME FCP (ms) LCP (ms) TBT (ms) SI (ms) LVC (ms) TFR SIZE (kb) SCORE RESULT
`web_project_merge_request_changes 1538 ✘ 12542 (<12500) ✓ 26156 (<32500) 9963 12616 1352.1 73 FAILED

After this is how it looked.

NAME FCP (ms) LCP (ms) TBT (ms) SI (ms) LVC (ms) TFR SIZE (kb) SCORE RESULT
web_project_merge_request_changes 1826 ✓ 9898 (<17500) ✓ 26222 (<32500) 8301 16117 1179.9 71 Passed

Target metric to improve

Taking a closer look at the TBT, it still fluctuates a look soaring to 30s frequently.

Screenshot_2020-12-21_at_19.11.10

http://10k.testbed.gitlab.net/-/grafana/d/jH6yoWVMz/gitlab-performance-sitespeed-results?viewPanel=4&orgId=1&from=now-30d&to=now

We need to bring down the TBT value.

More details

See this thread for context: #241841 (comment 469085171)

Edited by André Luís