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
Use a more efficient xml parser library #138
Conversation
79a3082
to
2be6e74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nineinchnick could you fix the lint problems npm run estlint
?
@ghaiszaher done! I bumped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
This reverts commit 5b7a533.
What
Reduce the memory usage and allow processing large XML reports (>100 MB) on public GHA runners, that have only 7 GB of memory.
How
Replace
xml-js
withlibxmljs
.I tested memory usage using:
Before:
After:
Here's another test with a large XML file. This is a test report from the Trino project, it's available in the CI as artifacts.
The file is almost 100 MB:
% du -mc "$INPUT_REPORT_PATHS" 89 /Users/jwas/Downloads/test-reports/test report test-other-modules/lib/trino-parquet/target/surefire-reports/TEST-TestSuite.xml
Now run the action:
% gtime -f '\t%E real,\t%U user,\t%S sys,\t%K amem,\t%M mmem' node index.js
Before:
After:
3.2 GB drops to 0.7 GB. There are also savings in processing time.
The changes in tests were required because:
utils.js
, the stacktrace was not properly set