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

Cache result of getBestFitRule (fixes #575) #365

Closed
wants to merge 2 commits into from
Closed

Cache result of getBestFitRule (fixes #575) #365

wants to merge 2 commits into from

Conversation

TobiX
Copy link
Contributor

@TobiX TobiX commented Sep 2, 2019

This was identified as a performance hotspot and the result is static
for each run, adding a cache dramatically speeds up some executions.

This is probably not the correct solution, but provides a dramatic speed-up in my cases. While getBestFitRule is called only once for each dependency in dependency-updates-report and plugin-updates-report, it is called over and over in property-updates-report (over 38,000,000 times in one of my sample projects). Unfortunately, I got lost in the call-graph pretty quickly - so if someone could prod me into the right direction for a better fix, that would be appreciated.

@TobiX
Copy link
Contributor Author

TobiX commented Sep 3, 2020

"Minimal" reproducer project:
versions-slow-rules.zip

On my system, this takes > 1 minute without my fix and ~ 5 seconds with my fix. If I find some more time I might wrap it into an maven-invoker test (with the timeout feature of MINVOKER-233)

@github-actions
Copy link

github-actions bot commented Sep 4, 2021

This PR is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 4, 2021
@TobiX
Copy link
Contributor Author

TobiX commented Sep 4, 2021

Ah, the attack of the stale bot :/ - FWIW, this is still an issue, we use this patch internally to speed up execution of the report generation...

@github-actions github-actions bot removed the Stale label Sep 5, 2021
TobiX and others added 2 commits March 17, 2022 14:49
This was identified as a performance hotspot and the result is static
for each run, adding a cache dramatically speeds up some executions.
@TobiX
Copy link
Contributor Author

TobiX commented Mar 17, 2022

Added invoker test to demonstrate the problem

@Inform-Software Inform-Software closed this by deleting the head repository Aug 23, 2022
@TobiX TobiX changed the title Cache result of getBestFitRule Cache result of getBestFitRule (fixes #575) Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants