Commit 348dd42d authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'sh-use-nokogiri-xml-backend' into 'master'

Use Nokogiri as the ActiveSupport XML backend

Closes #54068

See merge request gitlab-org/gitlab-ce!23136
parents 875bae16 198f2a0b
---
title: Use Nokogiri as the ActiveSupport XML backend
merge_request: 23136
author:
type: performance
......@@ -158,6 +158,9 @@ module Gitlab
config.action_view.sanitized_allowed_protocols = %w(smb)
# Nokogiri is significantly faster and uses less memory than REXML
ActiveSupport::XmlMini.backend = 'Nokogiri'
# This middleware needs to precede ActiveRecord::QueryCache and other middlewares that
# connect to the database.
config.middleware.insert_after Rails::Rack::Logger, ::Gitlab::Middleware::BasicHealthCheck
......
......@@ -14,7 +14,7 @@ module Gitlab
test_case = create_test_case(test_case)
test_suite.add_test_case(test_case)
end
rescue REXML::ParseException
rescue Nokogiri::XML::SyntaxError
raise JunitParserError, "XML parsing failed"
rescue
raise JunitParserError, "JUnit parsing failed"
......
......@@ -9,3 +9,4 @@ require 'active_support/all'
ActiveSupport::Dependencies.autoload_paths << 'lib'
ActiveSupport::Dependencies.autoload_paths << 'ee/lib'
ActiveSupport::XmlMini.backend = 'Nokogiri'
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