gitlab-org--gitlab-foss/app/services/notes
Yorick Peterse daad7144ec
Support Markdown rendering using multiple projects
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
2018-04-11 14:10:19 +02:00
..
build_service.rb Add discussion API 2018-03-07 12:27:50 +01:00
create_service.rb Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
destroy_service.rb Reset todo counters when the target is deleted 2017-12-18 12:23:00 +00:00
post_process_service.rb Merge branch 'jprovazn-comment-refs' into 'master' 2018-04-05 12:41:01 +00:00
quick_actions_service.rb Fix quick actions for users who cannot update issues and MRs 2018-03-02 16:16:13 +00:00
render_service.rb Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
update_service.rb Create todos only for new mentions 2017-03-29 17:20:11 +02:00