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

WIP Clear out NoramlizeCache if size exceeds 100 entries #2485

Closed
wants to merge 1 commit into from

Conversation

easel
Copy link

@easel easel commented May 20, 2022

Fixes #2484

Problem

NormalizeCache will grow forever if enough dynamic queries are compiled

Solution

Blow away the cache if it exceeds 100 entries, ensuring it stays bounded.

Notes

A nicer implementation would implement a real LRU cache. I don't anticipate this is a particularly hot loop and this two-line implementation solves the OOM so I think it's worth considering.

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

@easel easel marked this pull request as draft May 20, 2022 01:52
@guizmaii
Copy link
Member

Closing in favour of #2878

@guizmaii guizmaii closed this Sep 29, 2023
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.

NormalizeCaching cache grows without bound
2 participants