Skip to content

MemoryTarget improvement. #6022

@Orace

Description

@Orace

I noticed that the current MemoryTarget implementation has a few caveats:

  • Changes to the MaxLogsCount property doesn't trim the list.
  • If MaxLogCount is positive (n), an insertion cost is O(n) (because of a call to RemoveAt(0))
  • Enumeration of logs block the writers (!)

It appears that I have a resizable circular buffer implementation that can solve those issues. It's just missing some methods from IList (insert, removeAt) but can serve as a drop in replacement of ThreadSafeList.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions