diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-12-02 22:47:33 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-12-06 09:25:09 +0100 |
commit | 58bfd733310effa94af0e1f1f19e53e34235cffc (patch) | |
tree | e793b8f8b2669034e80b7668304f3fc75dc23deb /lib/api | |
parent | 00acef434031b5dc0bf39576a9e83802c7806842 (diff) | |
download | gitlab-ce-58bfd733310effa94af0e1f1f19e53e34235cffc.tar.gz |
Optimized file search to work without limits
* removed 100 limit on file search results because we
load all results anyway
* expensive processing (parsing match content, utf encoding)
is done only for selected page in paginated output
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/search.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/api/search.rb b/lib/api/search.rb index 5900e1cccc2..f5db692afe5 100644 --- a/lib/api/search.rb +++ b/lib/api/search.rb @@ -35,12 +35,7 @@ module API end def process_results(results) - case params[:scope] - when 'blobs', 'wiki_blobs' - paginate(results).map { |blob| blob[1] } - else - paginate(results) - end + paginate(results) end def snippets? |