-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add LRU Session Cache to Reduce RAM Usage #6239
Conversation
Benchmark for 9188c18Click to view benchmark
|
Benchmark for 4d3a6baClick to view benchmark
|
6c78dfc
to
0b77942
Compare
Benchmark for 6361215Click to view benchmark
|
Benchmark for 5cc7639Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I guess we were holding on to all sessions before this one. Do we have a benchmark we are running against to see mem usage? Maybe we can add that to CI run report once we have some headspace.
Nothing concrete. I was just looking at activity monitor and seeing the memory usage between clicking into new projects in the FUSD workspace. Previously we just kept adding more without a cap. opening 20 projects in that repo got to about 30gb so about 660mb per project. This should at least keep us 2-3gb usage range now. But strongly agree that adding a CI step for this would be very useful if we can find the capacity to implement it. |
Benchmark for 168f9fbClick to view benchmark
|
## Description This PR introduces an LRU (Least Recently Used) cache mechanism for managing sessions in large workspaces. This change aims to address the issue of high RAM usage reported in workspaces with multiple projects. closes #6222 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
Description
This PR introduces an LRU (Least Recently Used) cache mechanism for managing sessions in large workspaces. This change aims to address the issue of high RAM usage reported in workspaces with multiple projects.
closes #6222
Checklist
Breaking*
orNew Feature
labels where relevant.