Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Speedup gradle test output XML processing #508
As discussed in the https://youtrack.jetbrains.com/issue/IDEA-167449 issue I decided to implement faster XML processing for Gradle plugin that would avoid my most pain point for tests with heavy output flow.
Before the fix, IDEA UI was too overloaded. According to Activity Monitor IDEA process was eating even more CPU than tests worker process. You may find snapshot in the issue.
After the fix I see It consumes less CPU wither by IDEA UI responsiveness or by fresh CPU profiling.
Current implementation I use XStreams (it was included in classpath) Hierarchical parser that uses KXML pull parser implementation. The whole processing is done within one class.
Unfortunately, I was not able to implement integration tests to measure performance boost more technically as well as to make sure performance will not be lost again. Also, it looks like there are NO tests for test runner integration at all. Just let me know if you have some correct snippet to implement more test.
It would be better to introduce a new interface for text event message handler it should be format independent. Do not remove xpath implemetation for futher comparison. Add new implementation based on kxm library.
This will allow us easier switch the implementation (e.g. using binary format or other)
And also we need a performance test to be sure we are improving things.