Paginate the single commit view [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
Paginates the single commit view to drastically drop worst-case page load times. For huge commits with lots of files the main cost is just in rendering them all. This paginates them (to whatever the default page size is, 20 currently) and adds page controls at the bottom.
This will have a pretty notable effect on page load speed on commits like this: gitlab-runner@47bf51a1
Related #232509 (closed)
Related #300794 (closed)
Feature flag
paginate_commit_view
, disabled by default. Will be used to measure the impact of this change.
Performance improvement
Examples from my local dev machine:
Before
Completed 200 OK in 3770ms (Views: 3730.2ms | ActiveRecord: 6.0ms | Elasticsearch: 0.0ms | Allocations: 5276443)
After
Completed 200 OK in 2566ms (Views: 2529.2ms | ActiveRecord: 5.9ms | Elasticsearch: 0.0ms | Allocations: 3538191)
Screenshots (strongly suggested)
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 by 🤖 GitLab Bot 🤖