Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Mar 28, 2019

@TIHan and others have noticed excessive creation of ILModuleReader. Here's a possible fix, to be evaluated

@cartermp
Copy link
Contributor

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)
Copy link
Contributor

@TIHan TIHan Apr 3, 2019

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Becasause

  1. These caches themselves take space
  2. 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is commenting this intentional?

Copy link
Contributor Author

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.

@KevinRansom
Copy link
Contributor

@dsyme, how shall we choose between these two approaches?

@dsyme
Copy link
Contributor Author

dsyme commented Apr 9, 2019

Closing this since I think #6390 is better

@cartermp cartermp closed this Apr 9, 2019
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.

4 participants