BigW Consortium Gitlab

  1. 19 Sep, 2017 1 commit
    • Eliminate N+1 queries referencing issues · 0a2f93aa
      Stan Hu authored
      To load issue 1, we see that in #38033 that about 835 ms of the
      SQL queries were due to loading ProjectFeature. We should be
      able to cut this down by eagerly loading this information.
      
      Closes #38033
  2. 24 Jul, 2017 1 commit
  3. 30 Jun, 2017 1 commit
  4. 21 Jun, 2017 1 commit
  5. 14 Jun, 2017 1 commit
  6. 08 Jun, 2017 3 commits
    • Merge branch '25934-project-snippet-vis' into 'security-9-2' · ae6adf16
      DJ Mountney authored
      Fix visibility when referencing snippets
      
      See merge request !2101
    • Bring in security changes from the 9.2.5 release · 565ead61
      DJ Mountney authored
      Ran:
       - git format-patch v9.2.2..v9.2.5 --stdout > patchfile.patch
       - git checkout -b 9-2-5-security-patch origin/v9.2.2
       - git apply patchfile.patch
       - git commit
       - [Got the sha ref for the commit]
       - git checkout -b upstream-9-2-security master
       - git cherry-pick <SHA of the patchfile commit>
       - [Resolved conflicts]
       - git cherry-pick --continue
    • Bring in security changes from the 9.2.5 release · 1d1363e2
      DJ Mountney authored
      Ran:
       - git format-patch v9.2.2..v9.2.5 --stdout > patchfile.patch
       - git checkout -b 9-2-5-security-patch origin/v9.2.2
       - git apply patchfile.patch
       - git commit
       - [Got the sha ref for the commit]
       - git checkout -b upstream-9-2-security master
       - git cherry-pick <SHA of the patchfile commit>
       - [Resolved conflicts]
       - git cherry-pick --continue
  7. 30 May, 2017 1 commit
    • Fix /unsubscribe slash command creating extra todos · 172932ee
      Sean McGivern authored
      The /unsubscribe slash command means that we check if the current user is
      subscribed to the issuable without having an explicit subscription. That means
      that we use the UserParser to find references to them in the notes.
      
      The UserParser (and all parsers inheriting from BaseParser) use RequestStore to
      cache ActiveRecord objects, so that we don't need to load the User object each
      time, if we're parsing references a bunch of times in the same request.
      
      However, it was always returning _all_ of the previously cached items, not just
      the ones matching the IDs passed. This would mean that we did two runs through
      with UserParser if you were mentioned in a comment, and then mentioned someone
      else in your comment while using /unsubscribe:
      
      1. Because /unsubscribe was used, we see if you were mentioned in any comments.
      2. Because you mentioned someone, we find them - but we would also get back your
         user, even if you didn't mention yourself. This would have the effect of
         creating a mention or directly addressed todo for yourself incorrectly.
      
      The fix is simple: only return values from the cache matching the IDs passed.
  8. 04 May, 2017 1 commit
  9. 02 May, 2017 1 commit
    • Remove N+1 queries when checking nodes visible to user · 52d049b4
      Sean McGivern authored
      N in this case is low, as it's the number of distinct projects referenced from
      MRs, rather than the number of MRs referenced (issues use their own
      optimization). Still, on issues or MRs which are often referenced from MRs, it
      will save a few queries.
  10. 15 Apr, 2017 1 commit
  11. 10 Apr, 2017 1 commit
  12. 07 Apr, 2017 1 commit
    • Add indication for closed or merged issuables in GFM · ace833b3
      Adam Buckland authored
      Example: for issues that are closed, the links will now show '[closed]'
      following the issue number. This is done as post-process after the markdown has
      been loaded from the cache as the status of the issue may change between
      the cache being populated and the content being displayed.
      
      In order to avoid N+1 queries problem when rendering notes ObjectRenderer
      populates the cache of referenced issuables for all notes at once,
      before the post processing phase.
      
      As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes
      method has been refactored to return a Hash utilising the node itself as the
      key, since this was a common pattern of usage for this method.
  13. 16 Mar, 2017 1 commit
  14. 09 Mar, 2017 1 commit
  15. 23 Feb, 2017 2 commits
  16. 08 Feb, 2017 1 commit
  17. 09 Nov, 2016 1 commit
  18. 28 Sep, 2016 1 commit
  19. 30 Aug, 2016 1 commit
  20. 29 Jul, 2016 1 commit
    • Method for returning issues readable by a user · 002ad215
      Yorick Peterse authored
      The method Ability.issues_readable_by_user takes a list of users and an
      optional user and returns an Array of issues readable by said user. This
      method in turn is used by
      Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this
      method no longer needs to get all the available abilities just to check
      if a user has the "read_issue" ability.
      
      To test this I benchmarked an issue with 222 comments on my development
      environment. Using these changes the time spent in nodes_visible_to_user
      was reduced from around 120 ms to around 40 ms.
  21. 08 Jul, 2016 1 commit
  22. 16 Jun, 2016 2 commits
  23. 15 Jun, 2016 1 commit
    • Eager load project relations in IssueParser · fce675d7
      Yorick Peterse authored
      By eager loading these associations we can greatly cut down the number
      of SQL queries executed when processing documents with lots of
      references, especially in cases where there are references belonging to
      the same project.
      
      Since these associations are so specific to the reference parsing
      process and the permissions checking process that follows it I opted to
      include them directly in IssueParser instead of using something like a
      scope. Once we have a need for it we can move this code to a scope or
      method.
  24. 03 Jun, 2016 2 commits
  25. 26 May, 2016 1 commit
    • Split Markdown rendering & reference gathering · 86166d28
      Yorick Peterse authored
      This splits the Markdown rendering and reference extraction phases into
      two distinct code bases. The reference extraction phase no longer relies
      on the html-pipeline Gem (and any related code) and allows for
      extracting of references from multiple HTML nodes in a single pass. This
      means that if you want to extract user references from 200 comments you
      no longer need to run 200 times N number of queries, instead only a
      handful of queries may be needed.