Skip to content

Paginate the single commit view [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Robert May requested to merge paginate-commit into master

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)

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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 🤖

Merge request reports