Skip to content

perf(json): parse directly from string buffers#2

Closed
SaveTheRbtz wants to merge 1 commit into
masterfrom
codex-json-parser-buffer
Closed

perf(json): parse directly from string buffers#2
SaveTheRbtz wants to merge 1 commit into
masterfrom
codex-json-parser-buffer

Conversation

@SaveTheRbtz

@SaveTheRbtz SaveTheRbtz commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parse JsonParser input with JsonCpp CharReader directly from the existing string buffer.
  • Keep \x escape compatibility, but only allocate and run regex_replace when that escape is present.

Why

Profiles showed time in JsonCpp plus allocation/string work. This removes common-case parser overhead without changing callers, parsed output, or the JsonCpp dependency.

Testing

  • ninja -C build
  • meson test -C build

@SaveTheRbtz SaveTheRbtz force-pushed the codex-json-parser-buffer branch from 488827c to 5cce616 Compare June 4, 2026 22:04
@SaveTheRbtz SaveTheRbtz changed the title [codex] Parse JSON directly from string buffers perf(json): parse directly from string buffers Jun 4, 2026
@SaveTheRbtz SaveTheRbtz marked this pull request as ready for review June 4, 2026 22:57

Copy link
Copy Markdown
Owner Author

Closed in favor of upstream PR: Alexays#5108

@SaveTheRbtz SaveTheRbtz closed this Jun 6, 2026
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

Successfully merging this pull request may close these issues.

1 participant