diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-12-11 18:38:16 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-12-12 18:28:26 +0300 |
commit | 3ab026b7d69ec97796fe4bb409933d7a716eef19 (patch) | |
tree | 6711c10cf577250647330b1d2725e13ce2177a66 /changelogs | |
parent | 806a68a81f1baeed07c146b1b5d9eb77796c46ba (diff) |
Use memoization for commits on diffs
The Gitaly CommitService is being hammered by n + 1 calls, mostly when
finding commits. This leads to this gRPC being turned of on production:
https://gitlab.com/gitlab-org/gitaly/issues/514#note_48991378
Hunting down where it came from, most of them were due to
MergeRequest#show. To prove this, I set a script to request the
MergeRequest#show page 50 times. The GDK was being scraped by
Prometheus, where we have metrics on controller#action and their Gitaly
calls performed. On both occations I've restarted the full GDK so all
caches had to be rebuild.
Current master, 806a68a81f1baee, needed 435 requests
After this commit, 154 requests
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/zj-memoization-mr-commits.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/zj-memoization-mr-commits.yml b/changelogs/unreleased/zj-memoization-mr-commits.yml new file mode 100644 index 00000000000..59dfc6d6049 --- /dev/null +++ b/changelogs/unreleased/zj-memoization-mr-commits.yml @@ -0,0 +1,5 @@ +--- +title: Cache commits for MergeRequest diffs +merge_request: +author: +type: performance |