1. 11 2月, 2016 1 次提交
  2. 10 2月, 2016 1 次提交
  3. 04 2月, 2016 1 次提交
  4. 01 2月, 2016 1 次提交
    • Y
      Optimize fetching issues closed by a merge request · 99492d6b
      Yorick Peterse 提交于
      Instead of running ClosingIssueExtractor for every commit in a merge
      request we can gather all the commit messages (and the merge request
      description), concatenate all this together and then run
      ClosingIssueExtractor only once.
      
      The result of this is that MergeRequest#closes_issues is now between
      3.5x and 4x faster than the old setup. Using a merge request with 10
      commits (each referencing a number of issues to close) this reduced the
      call duration from around 200 milliseconds to around 50 milliseconds.
      
      As a result of these changes the Jira related tests for
      MergeRequest#closes_issues have been removed. These tests stubbed
      Commit#closes_issues meaning that the only code that was really tested
      was the call to Array#uniq to filter out duplicate issues. As this code
      is no longer used (nor present) the corresponding tests were removed.
      
      Related: gitlab-org/gitlab-ce#12419
      99492d6b
  5. 28 1月, 2016 2 次提交
  6. 21 1月, 2016 1 次提交
  7. 20 1月, 2016 2 次提交
  8. 15 1月, 2016 1 次提交
  9. 13 1月, 2016 1 次提交
  10. 07 1月, 2016 2 次提交
  11. 06 1月, 2016 2 次提交
  12. 05 1月, 2016 1 次提交
  13. 19 12月, 2015 1 次提交
  14. 15 12月, 2015 1 次提交
  15. 09 12月, 2015 1 次提交
  16. 07 12月, 2015 1 次提交
  17. 05 12月, 2015 1 次提交
  18. 02 12月, 2015 1 次提交
  19. 01 12月, 2015 3 次提交
  20. 24 11月, 2015 1 次提交
  21. 23 11月, 2015 1 次提交
  22. 21 11月, 2015 1 次提交
  23. 19 11月, 2015 1 次提交
    • Y
      Use a JOIN in IssuableFinder#by_project · 8591cc02
      Yorick Peterse 提交于
      When using IssuableFinder/IssuesFinder to find issues for multiple
      projects it's more efficient to use a JOIN + a "WHERE project_id IN"
      condition opposed to running a sub-query.
      
      This change means that when finding issues without labels we're now
      using the following SQL:
      
          SELECT issues.*
          FROM issues
          JOIN projects ON projects.id = issues.project_id
      
          LEFT JOIN label_links ON label_links.target_type = 'Issue'
                                AND label_links.target_id  = issues.id
      
          WHERE (
              projects.id IN (...)
              OR projects.visibility_level IN (20, 10)
          )
          AND issues.state IN ('opened','reopened')
          AND label_links.id IS NULL
          ORDER BY issues.id DESC;
      
      instead of:
      
          SELECT issues.*
          FROM issues
          LEFT JOIN label_links ON label_links.target_type = 'Issue'
                                AND label_links.target_id  = issues.id
      
          WHERE issues.project_id IN (
              SELECT id
              FROM projects
              WHERE id IN (...)
              OR visibility_level IN (20,10)
          )
          AND issues.state IN ('opened','reopened')
          AND label_links.id IS NULL
          ORDER BY issues.id DESC;
      
      The big benefit here is that in the last case PostgreSQL can't properly
      use all available indexes. In particular it ends up performing a
      sequence scan on the "label_links" table (processing around 290 000
      rows). The new query is roughly 2x as fast as the old query.
      8591cc02
  24. 18 11月, 2015 1 次提交
  25. 14 11月, 2015 1 次提交
  26. 13 11月, 2015 1 次提交
  27. 03 11月, 2015 1 次提交
  28. 23 10月, 2015 2 次提交
  29. 20 10月, 2015 1 次提交
  30. 16 10月, 2015 2 次提交
  31. 09 10月, 2015 1 次提交
  32. 08 10月, 2015 1 次提交