Improve performance of show action for Projects::BlameController under load into S2 tier
The Projects::BlameController#show
controller and action has been found to perform notably badly under load and well over our new performance target of 500ms.
This was actually highlighted initially by a competitor that led us (Quality) to review our testing in this area and add in tests to cover this area. For the page the results are as follows:
█ Results summary
* Environment: 10k
* Environment Version: 13.0.0-pre `f99438802d0`
* Option: 60s_200rps
* Date: 2020-05-13
* Run Time: 1m 20s (Start: 11:13:56 UTC, End: 11:15:16 UTC)
* GPT Version: v1.3.0
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
-----------------------|------|-------------------|------------|---------------------|---------------|-----------------
web_project_file_blame | 20/s | 0.95/s (>16.00/s) | 17206.59ms | 17777.21ms (<750ms) | 98.21% (>95%) | FAILED³
Metrics:
As shown the test found that the page performs at a substantially bad level with it returning a time to first byte result of around 17s. This was done against a sizeable file (~640kb), much like what our competitor used.
As part of the new performance targets this page is unfortunately well over our TTFB target and falls into the ~S1 tier.
Task is to reduce the performance of this page to the next tier of ~S2 (<9000ms).