Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve XML Scanner performance #444

Closed
angelozerr opened this issue Jun 17, 2019 · 0 comments · Fixed by #445
Closed

Improve XML Scanner performance #444

angelozerr opened this issue Jun 17, 2019 · 0 comments · Fixed by #445
Assignees
Labels
performance This issue or enhancement is related to performance concerns
Milestone

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Jun 17, 2019

In XML Scanner, it seems that consumed CPU time is spent in 3 regex to extract element name, attribute name and attribute value. This issue is to change just thoses regexp into a Java code to improve performance.

After testing that, a large file like nasa.xml is parsed 2-3 times faster

@angelozerr angelozerr self-assigned this Jun 17, 2019
@angelozerr angelozerr added the performance This issue or enhancement is related to performance concerns label Jun 17, 2019
angelozerr pushed a commit that referenced this issue Jun 17, 2019
Fix #444

This PR improve XMLScanner performance by replacing regex with java code
for the 3 regexp which are the most used (element name, attribute name,
attribute value).

After testing that, a large file like nasa.xml is parsed 2-3 times
faster. You can see this time when you start XMLScannerPerformance and
DOMParserPerformance.

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr added this to the v0.8.0 milestone Jun 17, 2019
angelozerr pushed a commit that referenced this issue Jun 18, 2019
Fix #444

This PR improve XMLScanner performance by replacing regex with java code
for the 3 regexp which are the most used (element name, attribute name,
attribute value).

After testing that, a large file like nasa.xml is parsed 2-3 times
faster. You can see this time when you start XMLScannerPerformance and
DOMParserPerformance.

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance This issue or enhancement is related to performance concerns
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant