002ad21581
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. |
||
---|---|---|
.. | ||
base_parser_spec.rb | ||
commit_parser_spec.rb | ||
commit_range_parser_spec.rb | ||
external_issue_parser_spec.rb | ||
issue_parser_spec.rb | ||
label_parser_spec.rb | ||
merge_request_parser_spec.rb | ||
milestone_parser_spec.rb | ||
snippet_parser_spec.rb | ||
user_parser_spec.rb |