daad7144ec
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. |
||
---|---|---|
.. | ||
api | ||
assets | ||
backup | ||
banzai | ||
bitbucket | ||
constraints | ||
container_registry | ||
declarative_policy | ||
generators/rails/post_deployment_migration | ||
gitaly | ||
gitlab | ||
google_api | ||
haml_lint | ||
json_web_token | ||
mattermost | ||
microsoft_teams | ||
omni_auth/strategies | ||
peek | ||
rouge | ||
rspec_flaky | ||
support | ||
system_check | ||
tasks | ||
additional_email_headers_interceptor.rb | ||
after_commit_queue.rb | ||
banzai.rb | ||
carrier_wave_string_file.rb | ||
declarative_policy.rb | ||
disable_email_interceptor.rb | ||
email_template_interceptor.rb | ||
event_filter.rb | ||
expand_variables.rb | ||
extracts_path.rb | ||
feature.rb | ||
file_size_validator.rb | ||
forever.rb | ||
gitlab.rb | ||
gt_one_coercion.rb | ||
milestone_array.rb | ||
static_model.rb | ||
system_check.rb | ||
unfold_form.rb | ||
uploaded_file.rb | ||
version_check.rb |