1. 14 Mar, 2019 1 commit
  2. 07 Jan, 2019 1 commit
  3. 13 Dec, 2018 1 commit
  4. 10 Dec, 2018 1 commit
    • Gabriel Mazetto's avatar
      Reduce N+1 from Activity Dashboard and Banzai · 4f5abe43
      Gabriel Mazetto authored
      There is a combination of few strategies implemented here:
      
      1. Few relations were eager loaded
      2. Changed few polymorphic routes to specific ones so we don't have to
         use `#becomes(Namespace)` which doesn't preserve association cache
      4f5abe43
  5. 29 Nov, 2018 1 commit
  6. 28 Nov, 2018 1 commit
  7. 05 Nov, 2018 1 commit
  8. 23 Oct, 2018 2 commits
  9. 06 Oct, 2018 1 commit
  10. 03 Oct, 2018 1 commit
  11. 17 Sep, 2018 1 commit
    • Yorick Peterse's avatar
      Added FromUnion to easily select from a UNION · 8a72f5c4
      Yorick Peterse authored
      This commit adds the module `FromUnion`, which provides the class method
      `from_union`. This simplifies the process of selecting data from the
      result of a UNION, and reduces the likelihood of making mistakes. As a
      result, instead of this:
      
          union = Gitlab::SQL::Union.new([foo, bar])
      
          Foo.from("(#{union.to_sql}) #{Foo.table_name}")
      
      We can now write this instead:
      
          Foo.from_union([foo, bar])
      
      This commit also includes some changes to make this new setup work
      properly. For example, a bug in Rails 4
      (https://github.com/rails/rails/issues/24193) would break the use of
      `from("sub-query-here").includes(:relation)` in certain cases. There was
      also a CI query which appeared to repeat a lot of conditions from an
      outer query on an inner query, which isn't necessary.
      
      Finally, we include a RuboCop cop to ensure developers use this new
      module, instead of using Gitlab::SQL::Union directly.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
      8a72f5c4
  12. 11 Sep, 2018 1 commit
  13. 07 Sep, 2018 1 commit
  14. 02 Aug, 2018 1 commit
  15. 30 Jul, 2018 1 commit
    • Bob Van Landuyt's avatar
      Show the status of a user in interactions · f1d3ea63
      Bob Van Landuyt authored
      The status is shown for
      - The author of a commit when viewing a commit
      - Notes on a commit (regular/diff)
      - The user that triggered a pipeline when viewing a pipeline
      - The author of a merge request when viewing a merge request
      - The author of notes on a merge request (regular/diff)
      - The author of an issue when viewing an issue
      - The author of notes on an issue
      - The author of a snippet when viewing a snippet
      - The author of notes on a snippet
      - A user's profile page
      - The list of members of a group/user
      f1d3ea63
  16. 27 Jul, 2018 1 commit
  17. 11 Jul, 2018 1 commit
  18. 03 Jul, 2018 2 commits
  19. 21 Jun, 2018 1 commit
  20. 20 Jun, 2018 2 commits
  21. 05 Jun, 2018 1 commit
    • Sean McGivern's avatar
      Fix an N+1 in avatar URLs · 6ecf819f
      Sean McGivern authored
      This is tricky: the query was being run in
      `ObjectStorage::Extension::RecordsUploads#retrieve_from_store!`, but we can't
      just add batch loading there, because the `#upload=` method there would use the
      result immediately, making the batch only have one item.
      
      Instead, we can pre-emptively add an item to the batch whenever an avatarable
      object is initialized, and then reuse that batch item in
      `#retrieve_from_store!`. However, this also has problems:
      
      1. There is a lot of logic in `Avatarable#retrieve_upload_from_batch`.
      2. Some of that logic constructs a 'fake' model for the batch key. This should
         be fine, because of ActiveRecord's override of `#==`, but it relies on that
         staying the same.
      6ecf819f
  22. 24 May, 2018 1 commit
    • Oswaldo Ferreira's avatar
      Persist truncated note diffs on a new table · bb8f2520
      Oswaldo Ferreira authored
      We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response.
      With this change we solve this problem and simplify a lot fetching this piece of info.
      bb8f2520
  23. 07 May, 2018 1 commit
  24. 05 Apr, 2018 2 commits
  25. 03 Apr, 2018 1 commit
  26. 07 Mar, 2018 1 commit
    • Jan Provaznik's avatar
      Add discussion API · dcdfa04b
      Jan Provaznik authored
      * adds basic discussions API for issues and snippets
      * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
      dcdfa04b
  27. 28 Feb, 2018 3 commits
  28. 05 Feb, 2018 1 commit
  29. 02 Feb, 2018 1 commit
  30. 01 Feb, 2018 1 commit
  31. 13 Dec, 2017 2 commits
  32. 12 Dec, 2017 1 commit
  33. 07 Dec, 2017 1 commit