BigW Consortium Gitlab
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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
access_requestable_spec.rb | Loading commit data... | |
awardable_spec.rb | Loading commit data... | |
case_sensitivity_spec.rb | Loading commit data... | |
issuable_spec.rb | Loading commit data... | |
mentionable_spec.rb | Loading commit data... | |
milestoneish_spec.rb | Loading commit data... | |
participable_spec.rb | Loading commit data... | |
statuseable_spec.rb | Loading commit data... | |
strip_attribute_spec.rb | Loading commit data... | |
subscribable_spec.rb | Loading commit data... | |
token_authenticatable_spec.rb | Loading commit data... |