SIGN IN SIGN UP

Avoid copying large payloads in Antigravity reads

gjson.GetBytes copies the matched subtree before returning it, so every read of
request.contents on a multi-megabyte request allocated another copy of it. The
reasoning replay, executor, signature validation and session identity paths all
read whole arrays this way, and hasExplicitSession parsed the entire body with
gjson.ParseBytes on every request.

Use the no-copy helpers for these reads. Each call site only reads from the
result and writes through sjson, which allocates a new buffer, so the payload
stays immutable while the results are alive.
S
sususu committed
99929209840ba6821925a821daf79361bcbc0595
Parent: b7a4415
Committed by sususu98 <33882693+sususu98@users.noreply.github.com> on 8/8/2026, 4:40:57 PM