mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-11 02:03:59 +08:00
scriptc_ts7_json_value_end searched for the next quote again after each backslash escape in a string, so a string with many escapes was scanned once per escape. The quote it found now stays the candidate end until an escape skips it, and each byte of a string is scanned once by each search. A test scans strings of 2,000,000 newline, backslash and quote escapes, alone and inside an object, and compares the ends with jsonValueEnd's; before the change it does not finish within 60 s.