From 198f2a0b6149a2e7c069ad3aaad6ced9f5bb3ea1 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 15 Nov 2018 22:49:48 -0800 Subject: Use Nokogiri as the ActiveSupport XML backend This significantly improves performance and reduces memory consumption when parsing XML files. On a test with 124 JUnit files from a CE build, there was about a 4x reduction in processing time. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54068 --- lib/gitlab/ci/parsers/test/junit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/ci/parsers/test/junit.rb b/lib/gitlab/ci/parsers/test/junit.rb index ed5a79d9b9b..2791730fd26 100644 --- a/lib/gitlab/ci/parsers/test/junit.rb +++ b/lib/gitlab/ci/parsers/test/junit.rb @@ -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" -- cgit v1.2.1