DocumentVersionCache
should use circular (or ring) buffers
#9811
Labels
Milestone
DocumentVersionCache
should use circular (or ring) buffers
#9811
DocumentVersionCache
caps the number ofIDocumentSnapshot
versions that are tracked for a particular document file path at 20. There are a couple of improvements that can be made to this part of the implementation:IDocumentSnapshot
instances in weak references but never makes any attempt to clean out expired references. So, it will continue to store snapshots (up to 20), even if there are expired entries.List<T>
. Once 20 snapshots have been cached, future snapshots result inRemoveAt(0)
being called, which results in an array copy for every future snapshot. This could be alleviated by using a different structure, such as a circular buffer.The text was updated successfully, but these errors were encountered: