diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-30 13:03:03 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-30 13:03:03 +0000 |
commit | 1e6ec57397078b68dfbdf9d7355f9307eece66f0 (patch) | |
tree | 0073bb1cdbc7e2888f52cb9e7e5de8765b00f072 /lib | |
parent | 16c71a3bab31ab909200fc319f04084e3931e04e (diff) | |
parent | a34c61d9c6ff16d858faada0483a3230294f5988 (diff) | |
download | gitlab-ce-1e6ec57397078b68dfbdf9d7355f9307eece66f0.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/markdown.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index fa9c0975bb8..889decc9b48 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -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] |