Skip to content

groot/internal/rcompress: better buffer reuse #712

Open
@sbinet

Description

@sbinet

we should consider introducing a better buffer+reader reuse strategy (e.g. for decompressor that support Reseting their readers)

this would reduce memory allocation and memory pressure.
this would then reduce the amount of work needed by the garbage collector.

issues:

  • as decompression/compression are tasks that greatly benefit from concurrency, we should devise a way not to limit it too drastically
  • races
  • for decompression, we need a mechanism to declare that a buffer is no longer in use (and a way to correctly do that)
  • consider using a type-parametrized sync.Map as proposed in proposal: sync, sync/atomic: add PoolOf, MapOf, ValueOf golang/go#47657

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions