1. 21 Mar, 2016 1 commit
  2. 17 Mar, 2016 1 commit
    • Yorick Peterse's avatar
      Cache project avatars stored in Git · 3e38fbd7665d
      Yorick Peterse authored
      The avatar logic has been moved from Project to Repository as this makes
      caching easier. The logic itself in turn has been changed so that the
      logo file names are cached in Redis. This cache is flushed upon pushing
      a commit but _only_ if:
      
      1. The commit was pushed to the default branch
      2. The commit actually changes any of the logo files
      
      If no branch or commit is given the cache is flushed anyway, this
      ensures that calling Repository#expire_cache without any arguments still
      flushes the avatar cache (e.g. this is used when removing a project).
      
      Fixes gitlab-org/gitlab-ce#14363
      3e38fbd7665d
  3. 15 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Ignore eager loading in Project.search UNION · 26b126f838c7
      Yorick Peterse authored
      The queries that are UNION'd together don't need any eager loading
      (since we really only use the resulting SQL instead of having
      ActiveRecord actually run the queries). By dropping any eager loaded
      associations queries such as the following work instead of producing a
      SQL error:
      
          Project.all.includes(:namespace).search('foo')
      26b126f838c7
    • Kamil Trzcinski's avatar
      Return the external issue tracker even if it's null · 2f5dd62ab64d
      Kamil Trzcinski authored
      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
      2f5dd62ab64d
  4. 13 Mar, 2016 1 commit
  5. 11 Mar, 2016 6 commits
  6. 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
      3065b4cfa6ae
  7. 09 Mar, 2016 1 commit
  8. 08 Mar, 2016 1 commit
  9. 07 Mar, 2016 14 commits
  10. 05 Mar, 2016 1 commit
  11. 03 Mar, 2016 2 commits
  12. 02 Mar, 2016 3 commits
  13. 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
      e19fc7ede028
  14. 24 Feb, 2016 2 commits
  15. 23 Feb, 2016 1 commit
  16. 17 Feb, 2016 1 commit
  17. 16 Feb, 2016 1 commit