[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 <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61539}
This commit is contained in:
Toon Verwaest 2019-05-15 15:43:10 +02:00 committed by Commit Bot
parent fdde894576
commit 123fbb7773

View File

@ -76,7 +76,7 @@ class JsonString final {
bool is_index() const { return is_index_; } bool is_index() const { return is_index_; }
private: private:
static const int kMaxInternalizedStringValueLength = 25; static const int kMaxInternalizedStringValueLength = 10;
union { union {
const int start_; const int start_;