Skip to content
Snippets Groups Projects
Commit 0ef8fd0d authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'rs-minor-banzai-perf' into 'master'

Don't bother going through an entire Banzai pipeline for empty text

See merge request !13300
parents 93e96c3f 01dc8e6d
No related branches found
No related tags found
No related merge requests found
Loading
@@ -132,6 +132,8 @@ module Banzai
Loading
@@ -132,6 +132,8 @@ module Banzai
end end
   
def self.cacheless_render(text, context = {}) def self.cacheless_render(text, context = {})
return text.to_s unless text.present?
Gitlab::Metrics.measure(:banzai_cacheless_render) do Gitlab::Metrics.measure(:banzai_cacheless_render) do
result = render_result(text, context) result = render_result(text, context)
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment