-
Notifications
You must be signed in to change notification settings - Fork 131
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
patch-diff-report-tool: add multi-thread support to CheckstyleReportsParser #344
Comments
We could split these into 2 threads, but this at best this will only cut the amount of time needed by half. At best is half because we are doubling the number of threads, but we still need to merge the 2 back into 1 so we probably never reach perfection of half the time. |
Starting to test out new change. Will update post as going on. Old run:
New run with XML reading multi-threaded:
|
I can already tell the change won't have much impact.
It is the merging that it is now stuck on. I will have to look at the method more closely, but the next obvious area of slowdown would be Edit: Edit 2:
|
I got it down to 20 minutes with the latest changes (originally 1 hour) using all 4 threads.
For whatever reason
|
The ExecutorService has to be shutdown manually otherwise the threads continue to live in the background and hold up the process from exiting. A regression test run wouldn't finish without doing this. @romani I will continue testing with regression to make sure I don't see anything else. |
Execution:
Config:
Both report XML files are 169 and 171 megs.
So far I have been waiting 45 minutes for the utility to finish. Based on the displays it has only been working on
CheckstyleReportsParser.parse
this entire time.I have 4 cores (8 threads) which are sitting idle while I am waiting for this 1 thread to finish basically all the work.
I believe we could multi-thread the following section:
contribution/patch-diff-report-tool/src/main/java/com/github/checkstyle/parser/CheckstyleReportsParser.java
Lines 131 to 134 in f4249ac
Maybe process each file separately with its own thread and memory and then combine the 2 after it is all loaded into memory.
Edit: It finally finished after a bit more than 1 hour.
The text was updated successfully, but these errors were encountered: