Read about our upcoming Code of Conduct on this issue

  1. 20 May, 2019 1 commit
  2. 05 Apr, 2019 1 commit
  3. 14 Mar, 2019 3 commits
  4. 05 Mar, 2018 1 commit
  5. 06 Feb, 2018 1 commit
  6. 23 Jan, 2018 1 commit
    • Jan Provaznik's avatar
      Use limit for search count queries · 6e854492e11d
      Jan Provaznik authored
      Search query is especially slow if a user searches a generic string
      which matches many records, in such case search can take tens of
      seconds or time out. To speed up the search query, we search only for
      first 1000 records, if there is >1000 matching records we just display
      "1000+" instead of precise total count supposing that with such amount
      the exact count is not so important for the user.
      
      Because for issues even limited search was not fast enough, 2-phase
      approach is used for issues: first we use simpler/faster query to get
      all public issues, if this exceeds the limit, we just return the limit.
      If the amount of matching results is lower than limit, we re-run more
      complex search query (which includes also confidential issues).
      Re-running the complex query should be fast enough in such case because the
      amount of matching issues is lower than limit.
      
      Because exact total_count is now limited, this patch also switches to
      to "prev/next" pagination.
      
      Related #40540
      6e854492e11d
  7. 02 Jan, 2018 1 commit
    • Jan Provaznik's avatar
      Skip projects filter on issues search · 30097c02a26a
      Jan Provaznik authored
      When searching for issues, an additional subquery
      is added which filters only issues in a project. If global context is
      used (no project is specified) this query filters all projects user has
      access to.
      
      In that case we can skip this filter because filtering only projects
      user has access to is added anyway.
      
      The filter is used only if a custom project context is specified
      
      Related to #40540
      30097c02a26a
  8. 22 Dec, 2017 1 commit
  9. 21 Dec, 2017 1 commit
    • Jan Provaznik's avatar
      Skip projects filter on merge requests search · 3f653b322429
      Jan Provaznik authored
      When searching for merge requests, an additional subquery
      is added which by default filters only merge requests which belong
      to source or target project user has permission for.
      
      This filter is not needed because more restrictive filter
      which checks if user has permission for target project
      is used in the query.
      
      So unless a custom projects filter is used by user, it's possible
      to skip the default projects filter and speed up the final query.
      
      Related to #40540
      3f653b322429
  10. 07 Oct, 2017 1 commit
  11. 02 Aug, 2017 1 commit
  12. 04 May, 2017 1 commit
  13. 25 Jan, 2017 1 commit
  14. 09 Dec, 2016 1 commit
  15. 29 Nov, 2016 1 commit
  16. 06 Sep, 2016 1 commit
  17. 09 Aug, 2016 1 commit
  18. 16 Jun, 2016 2 commits
  19. 13 Jun, 2016 1 commit
  20. 17 Mar, 2016 1 commit
  21. 11 Mar, 2016 1 commit
    • Yorick Peterse's avatar
      Refactor Gitlab::SearchResults · e3e24e843bbd
      Yorick Peterse authored
      Instead of plucking IDs this class now uses ActiveRecord::Relation
      objects. Plucking IDs is problematic as searching for projects can lead
      to a huge amount of IDs being loaded into memory only to be used as an
      argument for another query (instead of just using a sub-query).
      e3e24e843bbd