Skip to content

Feature request: add WithEncoderMaxMemory option #1092

@sirzooro

Description

@sirzooro

It is not possible to limit how much memory Encoder may use, what causes OOM problems with long-living encoders in embedded systems. Additionally Reset function does not free all memory, it clears buffers using x.y = x.y[:0], so allocated memory is not freed. This means that after compressing some extra long message memory usage grows and stays on higher level. I have checked existing encoder options and did not find one to limit memory usage. There are WithLowerEncoderMem and WithWindowSize which should help a bit, but I am afraid that they will not be enough in all cases. Please add new option WithEncoderMaxMemory to address this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions