Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@meikelmosby
Copy link
Contributor

@meikelmosby meikelmosby commented Dec 18, 2025

Problem

The LazyLoader class had a minor memory leak where pending promise references were not cleaned up
during cache eviction or clearing.

Changes

  • evictLRU(): Added cleanup of pendingLoads when evicting entries
  • clear(): Now clears pendingLoads to prevent promise accumulation
  • Reduced default cache size: From 100k to 50k entries to reduce memory footprint

Impact

  • Prevents accumulation of orphaned promise references

Testing

  • added tests & old tests still pass

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

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.

3 participants