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

ref(proguard): Properly size the in-memory cache #1424

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

loewenheim
Copy link
Contributor

By default, in-memory caches have a size of 100KiB. This is sufficient for file types where we only cache some bookkeeping structs in memory. In the case of Proguard, we cache ProguardMapper structs, and those can be quite hefty. In brief experiments I found a mapper to be slightly less than twice the size of the mapping file on disk, and those files can take up hundreds of megabytes.

Therefore:

  • We estimate the memory footprint of a ProguardMapper as twice the size of the file on disk;
  • We set the in-memory cache capacity for Proguard to 2GiB.

@loewenheim loewenheim requested a review from a team April 4, 2024 11:27
@loewenheim loewenheim self-assigned this Apr 4, 2024
@loewenheim loewenheim enabled auto-merge (squash) April 4, 2024 12:14
@loewenheim loewenheim merged commit 27c4c66 into master Apr 4, 2024
10 checks passed
@loewenheim loewenheim deleted the ref/proguard-cache branch April 4, 2024 12:15
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