From 123fbb7773e42d654651670c3264630411b67cf6 Mon Sep 17 00:00:00 2001 From: Toon Verwaest Date: Wed, 15 May 2019 15:43:10 +0200 Subject: [PATCH] [json] Don't internalize json string values longer than 10 chars Internalizing is useful if we expect the string to reoccur many times. Internalizing too long strings will cost due to hashing, and the resulting strings will be kept alive for longer. Drop the limit to 10 to be more conservative. Change-Id: I2ac2109ca03ab05dbc5c01d4efe6f912b12f65b7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611805 Commit-Queue: Toon Verwaest Reviewed-by: Igor Sheludko Cr-Commit-Position: refs/heads/master@{#61539} --- src/json-parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json-parser.h b/src/json-parser.h index 34ace531f9..a1c6099caa 100644 --- a/src/json-parser.h +++ b/src/json-parser.h @@ -76,7 +76,7 @@ class JsonString final { bool is_index() const { return is_index_; } private: - static const int kMaxInternalizedStringValueLength = 25; + static const int kMaxInternalizedStringValueLength = 10; union { const int start_;