Commit 0d9bb60c authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Set COMMIT_DIFFS_PER_PAGE=20 for CommitController

This should improve the memory usage the overall user experience as
diffs may be chunky and its rendering uses significant amount of memory
and cpu resources
parent eee39950
...@@ -24,7 +24,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -24,7 +24,7 @@ class Projects::CommitController < Projects::ApplicationController
end end
BRANCH_SEARCH_LIMIT = 1000 BRANCH_SEARCH_LIMIT = 1000
COMMIT_DIFFS_PER_PAGE = 75 COMMIT_DIFFS_PER_PAGE = 20
feature_category :source_code_management feature_category :source_code_management
......
...@@ -168,15 +168,15 @@ RSpec.describe CommitsHelper do ...@@ -168,15 +168,15 @@ RSpec.describe CommitsHelper do
let(:page) { 1 } let(:page) { 1 }
it "has 20 diffs" do it "has 20 diffs" do
expect(subject.size).to eq(75) expect(subject.size).to eq(20)
end end
end end
context "page 2" do context "page 5" do
let(:page) { 2 } let(:page) { 5 }
it "has the remaining 10 diffs" do it "has the remaining 5 out of 85 diffs" do
expect(subject.size).to eq(10) expect(subject.size).to eq(5)
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment