1. 13 Mar, 2016 1 commit
  2. 11 Mar, 2016 3 commits
    • Yorick Peterse's avatar
      Removed arel_table receiver from search methods · 4053214d5b6d
      Yorick Peterse authored
      We can just use "arel_table" in these cases instead of
    • Yorick Peterse's avatar
      Use ILIKE in Project.search_by_title · be12a3a0e063
      Yorick Peterse authored
      Similar to the changes made to Project.search the method
      Project.search_by_title now also uses Arel so it can automatically use
      ILIKE/LIKE instead of the lower() function.
    • Yorick Peterse's avatar
      Use ILIKE/LIKE + UNION in Project.search · 63941313f540
      Yorick Peterse authored
      This chance is broken up in two steps:
      1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
         "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
         using lower(). In many cases the use of lower() will force a slow
         sequence scan.
      2. Instead of using 1 query that searches both projects and namespaces
         using a JOIN we're using 2 separate queries that are UNION'd
         together. Using a JOIN would force a slow sequence scan, using a
         UNION avoids this.
      This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
      and LIKE on MySQL, removing the need to handle this manually.
  3. 10 Mar, 2016 1 commit
    • Yorick Peterse's avatar
      Optimize Project#ci_service(s) · 3065b4cfa6ae
      Yorick Peterse authored
      The method Project#ci_services would load all services into memory
      (including _all_ their columns) and then use Enumerable#select to reduce
      the list. Project#ci_service in turn would further reduce this list down
      to just 1 Service instance.
      Instead of doing all this in Ruby we can just offload the work to the
      database, reducing the amount of time spent in these methods. These
      changes reduce the time of the first call to Project#ci_services from
      around 240 ms to around 10 ms, though the final timings will vary based
      on database load. Because Project#ci_service is memoized there's no
      further overhead introduced by using a database query.
      Fixes gitlab-org/gitlab-ce#14186
  4. 09 Mar, 2016 1 commit
  5. 08 Mar, 2016 1 commit
  6. 07 Mar, 2016 14 commits
  7. 05 Mar, 2016 1 commit
  8. 03 Mar, 2016 1 commit
  9. 02 Mar, 2016 2 commits
  10. 26 Feb, 2016 1 commit
    • Yorick Peterse's avatar
      Flush repository caches before renaming projects · e19fc7ede028
      Yorick Peterse authored
      This ensures that if a project is later re-created using the old path it
      doesn't end up re-using the old cache. This also ensures we don't keep
      the cache around until its expired by Redis itself.
      Fixes gitlab-org/gitlab-ce#13790
  11. 24 Feb, 2016 2 commits
  12. 23 Feb, 2016 1 commit
  13. 17 Feb, 2016 1 commit
  14. 16 Feb, 2016 1 commit
  15. 11 Feb, 2016 1 commit
    • Kirill Zaitsev's avatar
      Add new data to project in push, issue, merge-request and note webhooks data · c6ea19b483b0
      Kirill Zaitsev authored
      - Add `avatar_url`, `description`, `git_ssh_url`, `git_http_url`,
        `path_with_namespace` and `default_branch` in `project` in push, issue,
        merge-request and note webhooks data
      - Deprecate the `ssh_url` in favor of `git_ssh_url` and `http_url` in
        favor of `git_http_url` in `project` for push, issue, merge-request and
        note webhooks data
      - Deprecate the `repository` key in push, issue, merge-request and
        note webhooks data, use `project` instead
  16. 08 Feb, 2016 1 commit
    • Yorick Peterse's avatar
      Cache various Repository Git operations · 09d8684679a2
      Yorick Peterse authored
      This caches the output of the following methods:
      * Repository#empty?
      * Repository#has_visible_content?
      * Repository#root_ref
      The cache for Repository#has_visible_content? is flushed whenever a
      commit is pushed to a new branch or an existing branch is removed.
      The cache for Repository#root_ref is only flushed whenever a user
      changes the default branch of a project. The cache for Repository#empty?
      is never explicitly flushed as there's no need for it.
  17. 05 Feb, 2016 2 commits
  18. 03 Feb, 2016 3 commits
  19. 29 Jan, 2016 1 commit
  20. 28 Jan, 2016 1 commit