A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/1451 below:

[core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string · Issue #1451 · pmd/pmd · GitHub

See here:

public Reader filterRuleSetFile(InputStream stream) throws IOException { byte[] bytes = IOUtils.toByteArray(stream); String encoding = determineEncoding(bytes); String ruleset = new String(bytes, encoding); ruleset = applyAllFilters(ruleset); return new StringReader(ruleset); }

applyAllFilters performs a bunch of regex replacements on the entire String, which creates many copies of it. We could do better by only filtering the ref attributes when parsing a rule reference node, this just seems very inefficient.

@jsotuyod This may offset your performance comparison of DOM and SAX for #724


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4