-
Notifications
You must be signed in to change notification settings - Fork 830
Possible fixes to reduce VS memory usage #6389
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
Conversation
|
We should also have a tracking issue with concrete data on the number (8000+) of entities based on the dump file we've been working on cc @TIHan |
|
|
||
| // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly | ||
| let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) | ||
| let cacheAssemblyRef = mkCacheInt32 false inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) |
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.
Why not make everything "false" here? I feel like we should be caching everything.
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.
Becasause
- These caches themselves take space
- It's not clear it's worth it - if the items aren't being duplicated in long term storage the cache isn't worth it - so we should work based off evidence that duplication is happening.
| let ilModuleReaderCacheLock = Lock() | ||
|
|
||
| // // Cache to extend the lifetime of readers that are eligible for GC | ||
| // let ilModuleReaderCache1 = new ConcurrentDictionary<ILModuleReaderCacheKey, ILModuleReader>(HashIdentity.Structural) |
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.
Is commenting this intentional?
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.
See #6390, which keeps both caches and is more conservative.
|
@dsyme, how shall we choose between these two approaches? |
|
Closing this since I think #6390 is better |
@TIHan and others have noticed excessive creation of ILModuleReader. Here's a possible fix, to be evaluated