Add configuration option for the size of the execution store #20042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #18255
Context
I do not know how many users are impact by this, but as described in related issue, I encountered much higher memory usage after the upgrade to the newer version of gradle (although I might be wrong, problems are very non-deterministic and sometimes happen even on an older version).
I have tracked the issue to the execution history cache. I believe it keeps some fingerprints for task inputs in memory. Those can get very big. In my case, single entry may be as large as a few MB (hunders/thousands of individual filenames).
I think that sizing of this cache should take into account that some keys might be much heavier that others - but let's leave it for the future. For know, I propose to simply add a property for the size of this cache. My problems disappear when I lower the default value from 10000 to 500 (20x!).
This will allow users with similar issues (kind-of-random GC problems) to check if the source is the same.
I haven't found any documentation for the similar property "org.gradle.cache.reserved.mb", so I also decided to skip documenting this one.
Contributor Checklist
<subproject>/src/integTest
) to verify changes from a user perspective<subproject>/src/test
) to verify logic./gradlew sanityCheck
./gradlew <changed-subproject>:quickTest
Gradle Core Team Checklist