GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2019-09-19T20:53:16Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4776Faster diffs2019-09-19T20:53:16ZJacob SchatzFaster diffs## What does this MR do?
Remove the comment buttons on diffs for MR.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## What are the relevant issue numbers?
## Screenshots (if relevant)
...## What does this MR do?
Remove the comment buttons on diffs for MR.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## What are the relevant issue numbers?
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
- [ ] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10Jacob SchatzJacob Schatzhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4787Remove Duplicated keys adding UNIQUE index to fingerprint2016-10-06T15:35:40ZPaco GuzmanRemove Duplicated keys adding UNIQUE index to fingerprint## What does this MR do?
Add a unique index to the keys fingerprint column. We added three migrations:
- Remove duplicates we kept the last key.
- We remove the existing index only when exists (gitlab-ee)
- Add the unique index f...## What does this MR do?
Add a unique index to the keys fingerprint column. We added three migrations:
- Remove duplicates we kept the last key.
- We remove the existing index only when exists (gitlab-ee)
- Add the unique index for gitlab-ce and gitlab-ee
## Why was this MR needed?
To remove a slow query
## What are the relevant issue numbers?
#18697
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- [x] Tests
- ~~[ ] Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4802Remove calls to Rugged::BranchCollection#each from extracts_path before_action2016-11-29T21:26:40ZPaco GuzmanRemove calls to Rugged::BranchCollection#each from extracts_path before_action## What does this MR do?
Check for git data first on the cache later on git.
## Why was this MR needed?
Remove Git data noise on dashboard to keep focusing on reducing those calls. This MR does not close original issue but I think is ...## What does this MR do?
Check for git data first on the cache later on git.
## Why was this MR needed?
Remove Git data noise on dashboard to keep focusing on reducing those calls. This MR does not close original issue but I think is going to give us a better insight in what is happening.
## What are the relevant issue numbers?
#18709
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- [x] Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4803Cache Participable#participants in instance variable2016-10-25T02:13:32ZPaco GuzmanCache Participable#participants in instance variable## Why was this MR needed?
Avoid repetitive calls to consuming methods
## What are the relevant issue numbers?
Closes #18792
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/bl...## Why was this MR needed?
Avoid repetitive calls to consuming methods
## What are the relevant issue numbers?
Closes #18792
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- [x] Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4813Optimize Banzai::Filter::RelativeLinkFilter2016-10-28T01:09:16Zusername-removed-367626Optimize Banzai::Filter::RelativeLinkFilter## What does this MR do?
Optimize Banzai::Filter::RelativeLinkFilter
A lot of git operations were being repeated, for example, to build a url
you would ask if the path was a Tree, which would call a recursive routine
in `Gitlab::...## What does this MR do?
Optimize Banzai::Filter::RelativeLinkFilter
A lot of git operations were being repeated, for example, to build a url
you would ask if the path was a Tree, which would call a recursive routine
in `Gitlab::Git::Tree#where`, then ask if the path was a Blob, which would
call a recursive routine at `Gitlab::Git::Blob#find`, making reference to
the same git objects several times. Now we call `Rugged::Tree#path`, which
allows us to determine the type of the path in one pass.
Some other minor improvement added, like saving commonly used references
instead of calculating them each time.
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
Banzai::Filter::RelativeLinkFilter is snow
## What are the relevant issue numbers?
Closes #18590
## Screenshots (if relevant)
For testing I prepared a file with many relative (to the current and to the root) paths repeated many times. The requests took the following times:
**BEFORE**
![Captura_de_pantalla_2016-06-20_a_las_7.15.27_p.m.](/uploads/2d07bdb8267d2282022734d11175138c/Captura_de_pantalla_2016-06-20_a_las_7.15.27_p.m..png)
**AFTER**
![Captura_de_pantalla_2016-06-20_a_las_7.18.36_p.m.](/uploads/b467e47c598c63e866846960c4a21590/Captura_de_pantalla_2016-06-20_a_las_7.18.36_p.m..png)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
/cc @pcarranza 8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4828Support for rendering/redacting multiple documents2017-03-15T12:31:52Zyorickpeterse-stagingSupport for rendering/redacting multiple documents## What does this MR do?
This MR does two things:
1. Separate redacting HTML documents from the htm-pipeline Gem and support redacting multiple documents at once
2. Add code that supports rendering and redacting multiple Markdown docum...## What does this MR do?
This MR does two things:
1. Separate redacting HTML documents from the htm-pipeline Gem and support redacting multiple documents at once
2. Add code that supports rendering and redacting multiple Markdown documents
See commit d7dc68ef878d2ad032efa92e25a8fa77250f9099 for more information.
## Are there points in the code the reviewer needs to double check?
Yes. The way notes are currently gathered in the controllers is something I'm not very fond of.
## Why was this MR needed?
Most of this is explained in d7dc68ef878d2ad032efa92e25a8fa77250f9099 but in short:
* Redacting happened per document, leading to lots of queries being executed for every comment.
* On GitLab.com between 1 and ~2.5 seconds is spent in redacting documents per request to `Projects::IssuesController#show`
* Redacting multiple documents at once greatly reduces the number of SQL queries executed.
## What are the relevant issue numbers?
#18581
## Screenshots (if relevant)
Before/after of the method timings:
![redact_timings](/uploads/cd13f02f32be3df81deac5aa64eee576/redact_timings.png)
Here the green bars are the timings for the `RedactorFilter#call` method, the orange-ish timings are for `Banzai::Redactor#redact`.
SQL query count impact:
![redact_query_timings](/uploads/a58201285109e5b8f2705b6d02bdf069/redact_query_timings.png)
Here the big drop just before 12:30 is when I switched to the branch of this MR, the number of queries dropped from around 4000 to around 2600.
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [x] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4830Move pre_process into render_result2016-11-27T20:50:59Zyorickpeterse-stagingMove pre_process into render_result## What does this MR do?
This MR moves `Banzai::Renderer.pre_process` into `Banzai::Renderer.render_result`.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
The `pre_proce...## What does this MR do?
This MR moves `Banzai::Renderer.pre_process` into `Banzai::Renderer.render_result`.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
The `pre_process` method was called even when its output would be ignored. See 11a5a4f359ee57029dbfcc9185fc6b47243ea2aa for more details.
## What are the relevant issue numbers?
None
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [x] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4871Add Sidekiq job latency to transaction metrics.2016-09-27T14:29:21ZPaco GuzmanAdd Sidekiq job latency to transaction metrics.## What does this MR do?
Add Sidekiq job latency to the current metric transaction
## Why was this MR needed?
To measure latency of the Sidekiq jobs
## What are the relevant issue numbers?
Related with #18663
## Does th...## What does this MR do?
Add Sidekiq job latency to the current metric transaction
## Why was this MR needed?
To measure latency of the Sidekiq jobs
## What are the relevant issue numbers?
Related with #18663
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4883Re-implement page-specific JS in a better way.2016-09-27T14:29:28Zusername-removed-386624Re-implement page-specific JS in a better way.## What does this MR do?
This rebuilds the way we do page-specific JavaScript assets for a few reasons:
- The current implementation does not work with Subresource Integrity (!4808)
- The current implementation doesn't allow caching of...## What does this MR do?
This rebuilds the way we do page-specific JavaScript assets for a few reasons:
- The current implementation does not work with Subresource Integrity (!4808)
- The current implementation doesn't allow caching of libraries because each page we hook up with this system will have a separate application.js. Meaning that for every page that uses Ace Editor, we'd have to load Ace Editor plus any GitLab-specific scripts in the same file, making local caching of just Ace Editor impossible.
- The current implementation is rather hacky.
## Are there points in the code the reviewer needs to double check?
That Sprockets doesn't choke on this when we use precompiled assets.
## What are the relevant issue numbers?
#14372
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
cc: @jschatz1 @pavelloz
Thanks to @pavelloz for his example implementation which was very useful.8.10Jacob SchatzJacob Schatzhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4899Use clock_gettime for all performance timestamps2016-11-27T20:51:02Zyorickpeterse-stagingUse clock_gettime for all performance timestamps## What does this MR do?
This MR adjusts the performance monitoring code to use `Process.clock_gettime` (thus `clock_gettime(3)`) instead of `Time.now`.
## Are there points in the code the reviewer needs to double check?
No.
...## What does this MR do?
This MR adjusts the performance monitoring code to use `Process.clock_gettime` (thus `clock_gettime(3)`) instead of `Time.now`.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
Using `Time.now` / `Time.new` adds more overhead than `Process.clock_gettime`, it also doesn't provide a way of getting timestamps in nanoseconds (which `Process.clock_gettime` does allow).
## What are the relevant issue numbers?
None.
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [x] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4914Ace ventura2017-06-19T14:48:06Zusername-removed-386624Ace ventura## What does this MR do?
Makes Ace only load when it's actually necessary. The only two places it seems to be used is for Snippets and the File (Blob) Editor.
Before minification or compression, this takes the application.js down f...## What does this MR do?
Makes Ace only load when it's actually necessary. The only two places it seems to be used is for Snippets and the File (Blob) Editor.
Before minification or compression, this takes the application.js down from 2.2MB to 1.6MB, and also removes two inline scripts :D
Compressed/Minified: master: 317KB/1.1MB, ace-ventura: 220KB/771KB
## Are there points in the code the reviewer needs to double check?
That this doesn't just completely break anything.
## Why was this MR needed?
Ace is a big library, this allows us to only load it when necessary.
## What are the relevant issue numbers?
#14372
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.11Jacob SchatzJacob Schatzhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4973Reduce overhead and optimize ProjectTeam#max_member_access performance2016-10-25T02:13:41ZStan HuReduce overhead and optimize ProjectTeam#max_member_access performanceThe previous implementation would load the entire team member list and their respective attributes. Now we only search for the user's specific
access level.
In gitlab-com/operations#42, this reduces the overall overhead of render...The previous implementation would load the entire team member list and their respective attributes. Now we only search for the user's specific
access level.
In gitlab-com/operations#42, this reduces the overall overhead of rendering the issue from 28% to 20%.
First step of optimizing #192738.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4978Split Cropper.js from the main JavaScript manifest.2016-09-15T15:53:03Zusername-removed-386624Split Cropper.js from the main JavaScript manifest.## What does this MR do?
Splits Cropper.js from the main JavaScript file.
## Are there points in the code the reviewer needs to double check?
That the avatar uploader works. (It did in my testing)
## Why was this MR needed?
Smaller ...## What does this MR do?
Splits Cropper.js from the main JavaScript file.
## Are there points in the code the reviewer needs to double check?
That the avatar uploader works. (It did in my testing)
## Why was this MR needed?
Smaller JS payload.
## What are the relevant issue numbers?
#14372
## Does this MR meet the acceptance criteria?
- Tests
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10username-removed-502136username-removed-502136https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4982Memoize the maximum access level for the author of notes2016-09-22T17:51:33ZStan HuMemoize the maximum access level for the author of notesCache the maximum access level for each user in a map in the controller
In #19273, we saw that retrieving ProjectTeam#human_max_access for each note takes the bulk of the time when rendering certain issues or merge requests. We ob...Cache the maximum access level for each user in a map in the controller
In #19273, we saw that retrieving ProjectTeam#human_max_access for each note takes the bulk of the time when rendering certain issues or merge requests. We observe that most of the comments in an issue are typically done by the same users. This MR memoizes the max access level by user ID.8.10Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4984PipelinesFinder use git cached data2016-09-21T00:51:29ZPaco GuzmanPipelinesFinder use git cached data## What does this MR do?
Avoid git calls and use cache data that probably always is on the cache
## What are the relevant issue numbers?
Closes #19318
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x]...## What does this MR do?
Avoid git calls and use cache data that probably always is on the cache
## What are the relevant issue numbers?
Closes #19318
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- ~~[ ] Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
Closes #193188.10yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4985Use update_columns to by_pass all the dirty code on active_record2016-11-20T11:08:32ZPaco GuzmanUse update_columns to by_pass all the dirty code on active_record## What does this MR do?
Speed up storing current content of merge_request_diff instances, avoiding YAML deserialization and serialization
## What are the relevant issue numbers?
#18663 one of the points of improvement
## Doe...## What does this MR do?
Speed up storing current content of merge_request_diff instances, avoiding YAML deserialization and serialization
## What are the relevant issue numbers?
#18663 one of the points of improvement
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.9yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4993Instrument cache fetch hit and misses2016-09-27T14:31:30ZPaco GuzmanInstrument cache fetch hit and misses## What does this MR do?
Add metrics to cache hits and cache misses
## Why was this MR needed?
To have a better knowledge in possible improvements on cache strategies
## What are the relevant issue numbers?
It's related wi...## What does this MR do?
Add metrics to cache hits and cache misses
## Why was this MR needed?
To have a better knowledge in possible improvements on cache strategies
## What are the relevant issue numbers?
It's related with https://gitlab.com/gitlab-org/gitlab-ce/issues/18709 and https://gitlab.com/gitlab-com/performance/issues/10
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4996Project dashboard appears to be loading tags on every request2016-09-21T00:51:38ZPaco GuzmanProject dashboard appears to be loading tags on every request## What does this MR do?
Better cache invalidation of git data, and start cache populate sooner after invalidations
## What are the relevant issue numbers?
Closes #18709 or at least reduce the impact
## Does this MR meet the ...## What does this MR do?
Better cache invalidation of git data, and start cache populate sooner after invalidations
## What are the relevant issue numbers?
Closes #18709 or at least reduce the impact
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4997Avoid instantiation of a Git::Tree2016-09-21T00:51:40ZPaco GuzmanAvoid instantiation of a Git::Tree## What does this MR do?
Avoid a git operation when doesn't needed
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentatio...## What does this MR do?
Avoid a git operation when doesn't needed
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
- ~~[ ] Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5020Re-use queries in reference parsers2016-09-21T00:52:03Zyorickpeterse-stagingRe-use queries in reference parsers## What does this MR do?
This MR changes the reference parsing pipeline to cache queried objects and re-use them on subsequent runs. Data is cached in the `RequestStore` module so it's automatically flushed after a request.
## Are ther...## What does this MR do?
This MR changes the reference parsing pipeline to cache queried objects and re-use them on subsequent runs. Data is cached in the `RequestStore` module so it's automatically flushed after a request.
## Are there points in the code the reviewer needs to double check?
Mostly the style of things.
## Why was this MR needed?
Certain references are processed multiple times. For example, for every system note we check if it's a cross reference by getting the issues, MRs and commits it references. When redacting data we may end up querying these very same objects. By caching this we can quite drastically reduce timings and SQL query counts.
## What are the relevant issue numbers?
#15607
## Screenshots (if relevant)
Staging timings (method calls):
![timings](/uploads/6382050d1449b5d4c1dbb1e6ca32721d/timings.png)
Production timings (method calls):
![production_query_counts](/uploads/dcf0c0d7485a68edde670150e6f1c453/production_query_counts.png)
![timing_issues_for_nodes_production](/uploads/1e2906a28ef42b5443172429ac06b063/timing_issues_for_nodes_production.png)
![timings_issue_references](/uploads/7d3809a14a4bfa1ef75eb68ec7daf5c5/timings_issue_references.png)
## Does this MR meet the acceptance criteria?
- [x] ~~[CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ For stable release, release manager will add it
- [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [x] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)8.10Robert SpeicherRobert Speicher