[json] add --json-parse-max-heuristic-internalized-strings [v8/v8 : main]

1 view
Skip to first unread message

Joyee Cheung (Gerrit)

unread,
Mar 9, 2026, 9:38:55 AM (8 days ago) Mar 9
to Leszek Swirski, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski

Joyee Cheung added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Joyee Cheung . resolved

PTAL, this should help reducing the surface for issues similar to https://issues.chromium.org/issues/477515021 - while there are still other pathways to get to internalizations, this is one of the most commonly exercised, and it doesn't seem particularly beneficial not to put a cap on it.

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
Gerrit-Change-Number: 7633265
Gerrit-PatchSet: 3
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:38:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
11:36 AM (11 hours ago) 11:36 AM
to Joyee Cheung, Leszek Swirski, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Joyee Cheung and Leszek Swirski

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m4-mini-perf/jetstream-main.crossbench complete.

  • json-parse-inspector: base median = 548.9386108895164 -> patched median = 539.8713513261112


See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1431c4ae090000

Open in Gerrit

Related details

Attention is currently required from:
  • Joyee Cheung
  • Leszek Swirski
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
Gerrit-Change-Number: 7633265
Gerrit-PatchSet: 3
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 15:36:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Leszek Swirski (Gerrit)

unread,
11:59 AM (11 hours ago) 11:59 AM
to Joyee Cheung, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Joyee Cheung

Leszek Swirski added 2 comments

Patchset-level comments
Joyee Cheung . resolved

PTAL, this should help reducing the surface for issues similar to https://issues.chromium.org/issues/477515021 - while there are still other pathways to get to internalizations, this is one of the most commonly exercised, and it doesn't seem particularly beneficial not to put a cap on it.

Leszek Swirski

Agree that this doesn't hurt, but isn't it trivial to turn `["1","2","3",...]` into `{"1":0,"2":0,"3":0,...}`?

Leszek Swirski . resolved

looks like this regresses json parsing 😞

Open in Gerrit

Related details

Attention is currently required from:
  • Joyee Cheung
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
Gerrit-Change-Number: 7633265
Gerrit-PatchSet: 3
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 15:59:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joyee Cheung <jo...@igalia.com>
unsatisfied_requirement
open
diffy

Joyee Cheung (Gerrit)

unread,
12:05 PM (11 hours ago) 12:05 PM
to chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski

Joyee Cheung added 1 comment

Patchset-level comments
Leszek Swirski . resolved

looks like this regresses json parsing 😞

Joyee Cheung

Seems a bit surprising that this could affect the benchmark results - I imagine the default budget should be high enough to not get hit most of the time and the additional checks is relatively trivial in the entire parser. Sorry but I am not very familiar with the benchmark UI - can you point me to where it's regressing/how to reproduce so I can try to investigate what's going on?

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
Gerrit-Change-Number: 7633265
Gerrit-PatchSet: 3
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 16:05:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Leszek Swirski <les...@chromium.org>
unsatisfied_requirement
open
diffy

Leszek Swirski (Gerrit)

unread,
12:09 PM (11 hours ago) 12:09 PM
to Joyee Cheung, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
Attention needed from Joyee Cheung

Leszek Swirski added 1 comment

Patchset-level comments
Leszek Swirski . unresolved

looks like this regresses json parsing 😞

Joyee Cheung

Seems a bit surprising that this could affect the benchmark results - I imagine the default budget should be high enough to not get hit most of the time and the additional checks is relatively trivial in the entire parser. Sorry but I am not very familiar with the benchmark UI - can you point me to where it's regressing/how to reproduce so I can try to investigate what's going on?

Leszek Swirski

I suspect it's as simple as this path being very hot, and the additional branch causing enough overhead to be relevant. This is the json-parse-inspector benchmark from jetstream3, there's instructions on https://github.com/WebKit/JetStream/.

Open in Gerrit

Related details

Attention is currently required from:
  • Joyee Cheung
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
    Gerrit-Change-Number: 7633265
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 16:09:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Joyee Cheung <jo...@igalia.com>
    Comment-In-Reply-To: Leszek Swirski <les...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Joyee Cheung (Gerrit)

    unread,
    12:12 PM (11 hours ago) 12:12 PM
    to chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Joyee Cheung

    Joyee Cheung added 1 comment

    Patchset-level comments
    Joyee Cheung . resolved

    PTAL, this should help reducing the surface for issues similar to https://issues.chromium.org/issues/477515021 - while there are still other pathways to get to internalizations, this is one of the most commonly exercised, and it doesn't seem particularly beneficial not to put a cap on it.

    Leszek Swirski

    Agree that this doesn't hurt, but isn't it trivial to turn `["1","2","3",...]` into `{"1":0,"2":0,"3":0,...}`?

    Joyee Cheung

    From a runtime POV this is mostly for capping the memory usage from user JSON whose format is out of the runtime's control e.g. a server can be JSON.parsing incoming JSON payloads that can come from anywhere, and not necessarily adhere to the expected schema (some validators do other forms of parsing for validation, but it's also quite common for them to just JSON.parse on anything that passes other sanity checks e.g. total size limit, the unconditional internalizing would still allow some level of asymmetric resource usage in this case).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joyee Cheung
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
    Gerrit-Change-Number: 7633265
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 16:11:58 +0000
    unsatisfied_requirement
    open
    diffy

    Joyee Cheung (Gerrit)

    unread,
    12:14 PM (11 hours ago) 12:14 PM
    to chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, v8-flag...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski

    Joyee Cheung added 1 comment

    Patchset-level comments
    Leszek Swirski . unresolved

    looks like this regresses json parsing 😞

    Joyee Cheung

    Seems a bit surprising that this could affect the benchmark results - I imagine the default budget should be high enough to not get hit most of the time and the additional checks is relatively trivial in the entire parser. Sorry but I am not very familiar with the benchmark UI - can you point me to where it's regressing/how to reproduce so I can try to investigate what's going on?

    Leszek Swirski

    I suspect it's as simple as this path being very hot, and the additional branch causing enough overhead to be relevant. This is the json-parse-inspector benchmark from jetstream3, there's instructions on https://github.com/WebKit/JetStream/.

    Joyee Cheung

    Thanks, I'll look into it. I think alternatively we can also gate it with a build config if it's the branching cost..

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I18442235d873e0015d4e5b7f4c2d60f4351d7c69
    Gerrit-Change-Number: 7633265
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 16:14:09 +0000
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages