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

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

See merge request !13300
This commit is contained in:
Douwe Maan
2017-08-04 07:10:53 +00:00

View File

@ -132,6 +132,8 @@ module Banzai
end
def self.cacheless_render(text, context = {})
return text.to_s unless text.present?
Gitlab::Metrics.measure(:banzai_cacheless_render) do
result = render_result(text, context)