Skip to content

Limit worst-case memory for string/depth buffers after simdjson call completes #73

Open

Description

@TysonAndre

E.g. if there's a long-running CLI application that calls simdjson_decode() once on startup, for a 100 megabyte long string, then avoid keeping around the 100 megabyte buffer that was allocated for the C simdjson parser after it is finished being used.

This would make it easier to reason about the worst-case impact of simdjson on PHP's memory usage.

If a buffer would be longer than a certain threshold (e.g. 100KB), then use a different short-lived instance (so that the same parser/buffer can be reused when calling simdjson again on small json blobs)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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