Skip to content

Control over buffering of comments #272

@kornelski

Description

@kornelski

Currently comments are buffered entirely for the comment handler.

Documents with pathologically long comments can hit the memory limit, and the user has no way of preventing that, other than not using comment handlers.

It's wasteful and unnecessary if the handler intends to remove comments.

I think we could add some control for it, e.g. add a configurable maximum length of comment to buffer. If the comment is longer than this, then discard the entire comment (with 0 buffer len acting as automatic comment removal). Another option could be to split the comment and handle it in fragments, but that would be as complicated as text chunks (#256).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions