gitlab-org--gitlab-foss/lib/banzai/reference_parser
Yorick Peterse 002ad21581
Method for returning issues readable by a user
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.
2016-07-29 12:51:18 +02:00
..
base_parser.rb Re-use queries in reference parsers 2016-07-08 21:54:35 +02:00
commit_parser.rb
commit_range_parser.rb
external_issue_parser.rb
issue_parser.rb Method for returning issues readable by a user 2016-07-29 12:51:18 +02:00
label_parser.rb
merge_request_parser.rb
milestone_parser.rb
snippet_parser.rb
user_parser.rb Re-use queries in reference parsers 2016-07-08 21:54:35 +02:00