BigW Consortium Gitlab

  1. 30 Aug, 2017 1 commit
  2. 23 Aug, 2017 1 commit
    • Cache the number of open issues and merge requests · 6ec53f5d
      Yorick Peterse authored
      Every project page displays a navigation menu that in turn displays the
      number of open issues and merge requests. This means that for every
      project page we run two COUNT(*) queries, each taking up roughly 30
      milliseconds on GitLab.com. By caching these numbers and refreshing them
      whenever necessary we can reduce loading times of all these pages by up
      to roughly 60 milliseconds.
      
      The number of open issues does not include confidential issues. This is
      a trade-off to keep the code simple and to ensure refreshing the data
      only needs 2 COUNT(*) queries instead of 3. A downside is that if a
      project only has 5 confidential issues the counter will be set to 0.
      
      Because we now have 3 similar counting service classes the code
      previously used in Projects::ForksCountService has mostly been moved to
      Projects::CountService, which in turn is reused by the various service
      classes.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
  3. 11 Aug, 2017 1 commit
  4. 09 Aug, 2017 1 commit
  5. 07 Aug, 2017 1 commit
  6. 02 Aug, 2017 1 commit
  7. 01 Aug, 2017 1 commit
  8. 27 Jul, 2017 1 commit
  9. 21 Jun, 2017 1 commit
  10. 14 Jun, 2017 1 commit
  11. 12 May, 2017 1 commit
  12. 04 May, 2017 2 commits
  13. 20 Apr, 2017 1 commit
  14. 10 Apr, 2017 1 commit
  15. 04 Apr, 2017 1 commit
  16. 21 Mar, 2017 1 commit
  17. 17 Mar, 2017 1 commit
  18. 14 Mar, 2017 2 commits
  19. 23 Feb, 2017 2 commits
  20. 27 Jan, 2017 3 commits
  21. 26 Jan, 2017 1 commit
  22. 25 Jan, 2017 1 commit
  23. 03 Jan, 2017 1 commit
  24. 15 Dec, 2016 1 commit
  25. 02 Dec, 2016 1 commit
  26. 23 Nov, 2016 1 commit
  27. 09 Nov, 2016 1 commit
  28. 20 Oct, 2016 1 commit
  29. 28 Sep, 2016 1 commit
    • Allow Member.add_user to handle access requesters · ec0061a9
      Rémy Coutable authored
      Changes include:
      
      - Ensure Member.add_user is not called directly when not necessary
      - New GroupMember.add_users_to_group to have the same abstraction level as for Project
      - Refactor Member.add_user to take a source instead of an array of members
      - Fix Rubocop offenses
      - Always use Project#add_user instead of project.team.add_user
      - Factorize users addition as members in Member.add_users_to_source
      - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects
      - Destroy any requester before adding them as a member
      - Improve the way we handle access requesters in Member.add_user
        Instead of removing the requester and creating a new member,
        we now simply accepts their access request. This way, they will
        receive a "access request granted" email.
      - Fix error that was previously silently ignored
      - Stop raising when access level is invalid in Member, let Rails validation do their work
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
  30. 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.
  31. 20 Jul, 2016 1 commit
  32. 03 Jun, 2016 2 commits
  33. 02 Jun, 2016 1 commit
  34. 01 Jun, 2016 1 commit
    • Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      
      == Explicit Stack
      
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      
      == Proc Behaviour Changed
      
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      
      == Permissions Checking
      
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.