Commit 1e6ec573 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'reuse-html-pipeline' into 'master'

Reuse HTML Pipeline object in Markdown parser

The patches reduces pressure on GC and reduces markdown processing time

See merge request !905
parents 16c71a3b a34c61d9
......@@ -54,7 +54,7 @@ module Gitlab
current_user: current_user
)
pipeline = HTML::Pipeline.new(filters)
@pipeline ||= HTML::Pipeline.new(filters)
context = {
# SanitizationFilter
......@@ -79,7 +79,7 @@ module Gitlab
project_wiki: @project_wiki
}
result = pipeline.call(text, context)
result = @pipeline.call(text, context)
save_options = 0
if options[:xhtml]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment