GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2016-09-29T14:57:58Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3533Update language after doing all other operations2016-09-29T14:57:58ZKamil TrzcińśkiUpdate language after doing all other operationsDoing this, because this is disk-intensive operation:
```
Benchmark.measure { p.repository.main_language }
=> #<Benchmark::Tms:0x007ff0184c17f0 @label="", @real=11.508067638, @cstime=0.0, @cutime=0.0, @stime=0.5099999999999998, @utime...Doing this, because this is disk-intensive operation:
```
Benchmark.measure { p.repository.main_language }
=> #<Benchmark::Tms:0x007ff0184c17f0 @label="", @real=11.508067638, @cstime=0.0, @cutime=0.0, @stime=0.5099999999999998, @utime=4.1299999999999955, @total=4.639999999999995>
```
8.6yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3486Added & use Gitlab::Routing for URL helpers2016-10-20T18:01:39Zyorickpeterse-stagingAdded & use Gitlab::Routing for URL helpersExtracted from !3389Extracted from !33898.7Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3485Memoize reference_pattern/link_reference_pattern2016-10-27T20:58:08Zyorickpeterse-stagingMemoize reference_pattern/link_reference_patternExtracted from !3389Extracted from !33898.7Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3458Pre-calculate Emoji digests2016-10-13T04:27:35Zyorickpeterse-stagingPre-calculate Emoji digestscc @dzaporozhets @rspeicher
@marin Do you happen to know if we allow users to configure asset hosts anywhere in Omnibus and such? I've not been able to find any reference to "asset_host" so it seems we don't allow this (which is a go...cc @dzaporozhets @rspeicher
@marin Do you happen to know if we allow users to configure asset hosts anywhere in Omnibus and such? I've not been able to find any reference to "asset_host" so it seems we don't allow this (which is a good thing as this simplifies the code).8.7username-removed-444username-removed-444https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3410Using the previous last commit id instead of the offset count to get the olde...2016-04-06T04:41:58Zusername-removed-7736Using the previous last commit id instead of the offset count to get the older commit history## Why was this MR needed?
Increasing the offset count, the GitLab::Git::Repository#log becomes slower.
## What are the relevant issue numbers?
#13808 ## Why was this MR needed?
Increasing the offset count, the GitLab::Git::Repository#log becomes slower.
## What are the relevant issue numbers?
#13808 8.7yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3389Improve rendering performance of Banzai2016-10-27T20:58:08Zyorickpeterse-stagingImprove rendering performance of BanzaiRelated issues:
* gitlab-org/gitlab-ce#14315
* gitlab-org/gitlab-ce#13651
TODO:
* [x] `Banzai::Filter::ExternalIssueReferenceFilter#call` calls `Project#default_issues_tracker?` which runs a query on every call. Memoizing this ...Related issues:
* gitlab-org/gitlab-ce#14315
* gitlab-org/gitlab-ce#13651
TODO:
* [x] `Banzai::Filter::ExternalIssueReferenceFilter#call` calls `Project#default_issues_tracker?` which runs a query on every call. Memoizing this only works if the `Project` instance is shared between instances of this filter. Either way it should at most only run this method once.
* [x] Fix the two failing specs
* [x] Clean of the various `call` methods in the filters where I inlined methods
* [x] Remove the `replace_XXX` methods in ReferenceFilter now that they're no longer used.8.7Douwe MaanDouwe Maanhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3296Improve performance of viewing individual issues2016-10-14T20:05:27Zyorickpeterse-stagingImprove performance of viewing individual issuesThis MR does two things:
1. `Issue#related_branches` no longer performs Git operations that aren't needed
2. The output of `Repository#exists?` is now cached and flushed properly
Combined these two changes should further cut down ...This MR does two things:
1. `Issue#related_branches` no longer performs Git operations that aren't needed
2. The output of `Repository#exists?` is now cached and flushed properly
Combined these two changes should further cut down the amount of Git operations performed when viewing individual issues (and possibly other pages).8.6Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3274Removed diverging commit count calculation from Repository#build_cache2016-09-29T14:56:25Zyorickpeterse-stagingRemoved diverging commit count calculation from Repository#build_cacheUsing a repository with 1000 branches the old `Repository#build_cache` method would take around 180 seconds to complete. Without calculating the diverging commit counts this method "only" takes around 60 seconds.
See commit 28cc2413e...Using a repository with 1000 branches the old `Repository#build_cache` method would take around 180 seconds to complete. Without calculating the diverging commit counts this method "only" takes around 60 seconds.
See commit 28cc2413eb5ddf920ce0b5eed803121f8b884754 for more details. This fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14058
cc @rspeicher 8.6username-removed-5302username-removed-5302https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3272Cache project avatars stored in Git2016-09-15T15:43:49Zyorickpeterse-stagingCache project avatars stored in GitRelated issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/14363
cc @joshfng @DouweM Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/14363
cc @joshfng @DouweM 8.6Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3249Added an index on ci_runners.token2016-09-29T14:56:13Zyorickpeterse-stagingAdded an index on ci_runners.tokencc @ayufan @pcarranza cc @ayufan @pcarranza 8.6yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3218Return the external issue tracker even if it's null2016-10-14T20:05:18ZKamil TrzcińśkiReturn the external issue tracker even if it's nullThis solves the problem with caching the nil value with instance variable.
Without this the every time we ask for external_issue_tracker we built AR and potentially do SQL query.
This solves the problem with caching the nil value with instance variable.
Without this the every time we ask for external_issue_tracker we built AR and potentially do SQL query.
8.6yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3185Show a notice for diffs that are empty/too large2016-09-29T14:56:26Zyorickpeterse-stagingShow a notice for diffs that are empty/too largeThis builds upon https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 but will fail until said MR has been merged.
Fixes gitlab-org/gitlab-ce#13912, gitlab-org/gitlab-ce#13644, gitlab-org/gitlab-ce#13557, gitlab-org/gitlab-ce#13...This builds upon https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 but will fail until said MR has been merged.
Fixes gitlab-org/gitlab-ce#13912, gitlab-org/gitlab-ce#13644, gitlab-org/gitlab-ce#13557, gitlab-org/gitlab-ce#13267, gitlab-org/gitlab-ce#39068.6username-removed-5302username-removed-5302https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3158Optimize Project#ci_service(s)2016-10-14T20:05:12Zyorickpeterse-stagingOptimize Project#ci_service(s)Related issue: gitlab-org/gitlab-ce#14186Related issue: gitlab-org/gitlab-ce#141868.6Douwe MaanDouwe Maanhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3128Use dedicated methods for counting branches and tags2016-09-29T14:55:35Zyorickpeterse-stagingUse dedicated methods for counting branches and tagsThis started out as "Lets add two methods to count and cache some data" and ended up in a clean-up/fix of some existing code. The two problems were:
1. Different code was used for adding/removing branches/tags via Git and the UI
2. T...This started out as "Lets add two methods to count and cache some data" and ended up in a clean-up/fix of some existing code. The two problems were:
1. Different code was used for adding/removing branches/tags via Git and the UI
2. The code used for the UI didn't have any RSpec tests, and I couldn't find any Spinach tests either (though grepping for Spinach stuff is hard)
This MR addresses the following:
1. `Repository#branch_count` and `Repository#tag_count` are used to count and cache the number of branches/tags, these methods are then used on the branches/commits/tags pages.
2. `Repository#add_tag`, `Repository#add_branch`, `Repository#rm_tag` and `Repository#rm_branch` now all the appropriate before/after hook methods instead of calling a random single cache expiration method. This ensures caches are properly flushed when adding/removing tags/branches via the UI.
3. RSpec tests were added for the above methods.
This fixes gitlab-org/gitlab-ce#134598.6Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3123Updated gitlab_git to 9.0.12016-09-29T23:02:27Zyorickpeterse-stagingUpdated gitlab_git to 9.0.1This includes gitlab-org/gitlab_git!69 and will hopefully solve
gitlab-org/gitlab-ce#13808.This includes gitlab-org/gitlab_git!69 and will hopefully solve
gitlab-org/gitlab-ce#13808.8.6Douwe MaanDouwe Maanhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3113Set cache headers for raw blobs2016-09-29T14:55:31Zusername-removed-5302Set cache headers for raw blobsThis changes allows browsers and (in the case of public projects)
proxy caches to cache raw Git blob responses.This changes allows browsers and (in the case of public projects)
proxy caches to cache raw Git blob responses.8.6Douwe MaanDouwe Maanhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/3095Commit limits2017-05-11T16:50:33Zusername-removed-5302Commit limitsPrevent timeouts when creating/viewing Merge Requests with many
commits. Also, reduce the number of commits shown in the UI from 500
to 100.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14031
This MR avoids Unicorn timeo...Prevent timeouts when creating/viewing Merge Requests with many
commits. Also, reduce the number of commits shown in the UI from 500
to 100.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14031
This MR avoids Unicorn timeouts in some places and takes 4.5 seconds
off load times in others, when manually testing with a 4500-commit
compare/MR in the linux repo. It does not limit the number of Commit
objects instantiated in memory, just the amount of HTML generated. It
seems that having 4500 commits objects is not a problem in itself. If
it ever becomes one we could do something for Commit objects like we
did for Diff (introduce a CommitCollection or something).8.6username-removed-5302username-removed-5302https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2987Refactor searching and use PostgreSQL trigram indexes for significantly impro...2016-09-29T14:55:57Zyorickpeterse-stagingRefactor searching and use PostgreSQL trigram indexes for significantly improved performanceRelated issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/13743.
Also fixes #12410Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/13743.
Also fixes #124108.6Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2829Don't use union query, it's very slow in MySQL.2017-08-08T03:49:19Zusername-removed-198553huacnlee@gmail.comDon't use union query, it's very slow in MySQL.The new changes is from 1 complex SQL to N simple SQL.
In our complex data environment, the Users#show page response time reduce from 5s to 500ms.
![屏幕快照_2016-02-16_18.19.06](/uploads/e968f49ed70f26f36166476e42668444/屏幕快照_2016-02-1...The new changes is from 1 complex SQL to N simple SQL.
In our complex data environment, the Users#show page response time reduce from 5s to 500ms.
![屏幕快照_2016-02-16_18.19.06](/uploads/e968f49ed70f26f36166476e42668444/屏幕快照_2016-02-16_18.19.06.png)
![屏幕快照_2016-02-16_18.10.34](/uploads/3bf5b0f00605e142f9bfd8f8a609745e/屏幕快照_2016-02-16_18.10.34.png)
![屏幕快照_2016-02-16_18.13.02](/uploads/a9b7381e2df1016d6d0fb8fa134a2ef6/屏幕快照_2016-02-16_18.13.02.png)
![屏幕快照_2016-02-16_18.16.31](/uploads/e3c5072758b6531c63292aa21a9b7c20/屏幕快照_2016-02-16_18.16.31.png)
https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2769Smarter flushing of branch statistics caches2016-10-13T03:57:38Zyorickpeterse-stagingSmarter flushing of branch statistics cachesThis basically ensures we only flush caches of branches whenever we really have to. See commit c514f8b850219cd3e5526e73e1d00e6729e2b466 for the details.
cc @joshfng @rspeicher This basically ensures we only flush caches of branches whenever we really have to. See commit c514f8b850219cd3e5526e73e1d00e6729e2b466 for the details.
cc @joshfng @rspeicher 8.5yorickpeterse-stagingyorickpeterse-staging