Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TysonAndre opened this issue Oct 1, 2022 · 0 comments

Comments

@TysonAndre
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant