7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule.
This PR addresses the optimization of Class Leak Rule.
Please refer the JBS for the sample JFR which was taking ~90 minutes to generate results for Class Leak Rule. After the optimization time is reduced to ~10-15 minutes.
Please review the change and let me the know if there are any comments / suggestions.
Progress
- [x] Commit message must refer to an issue
- [ ] Change must be properly reviewed
Issue
- JMC-7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule.
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jmc pull/248/head:pull/248
$ git checkout pull/248
Update a local copy of the PR:
$ git checkout pull/248
$ git pull https://git.openjdk.java.net/jmc pull/248/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 248
View PR using the GUI difftool:
$ git pr show -t 248
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jmc/pull/248.diff
:wave: Welcome back schaturvedi! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
Hi @bric3 thanks for your review. Looks like we need to redesign this rule because 15 min is too much time in itself to calculate rule results. I tried Stream::parallelStream approach as well but unfortunately that is taking around 25-30 min which is unacceptable. So I will look into it again.
@Suchitainf, Yes indeed this looks long, maybe be redesigning the task itself it might be possible to better leverage an FJP.
Hi Suchita!
We believe that this rule probably need to be redesigned to be useful in practice. That said, we could take your changes (after acting on @bric3 feedback), as it does at least improve matters, as an improvement until we get around to properly fixing it.
Hi, Sorry for the late reply, I'm on a spring-break with kids. I believe the time out constraints solves a part of the issue, but I still think the executor code should be improved before merging this one.
Hi @Suchitainf - just checking on how you want to proceed with this one.
@Suchitainf this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:
git checkout 7248
git fetch https://git.openjdk.org/jmc master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push
@Suchitainf Should we close this PR ?
The changes are done as part of 7879 ticket. Hence, closing this draft PR.