gitlab-org--gitlab-foss/app
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
..
assets Merge branch '40487-axios-pipelines' into 'master' 2018-04-10 10:15:12 +00:00
controllers Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
finders Reduce complexity of issuable finder query. 2018-04-09 18:49:08 +02:00
helpers Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
mailers
models Verify that deploy token has valid access when pulling container registry image 2018-04-10 07:31:30 +00:00
policies Support Deploy Tokens properly without hacking abilities 2018-04-06 21:20:16 -05:00
presenters Removes deploy tokens presenter 2018-04-06 21:20:17 -05:00
serializers
services Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
uploaders
validators
views Merge branch 'sh-fix-issue-45152' into 'master' 2018-04-09 08:20:28 +00:00
workers Work around Ruby 2.3.7 bug by defining prepended class methods needed for tests 2018-04-09 06:46:33 -07:00