Comment #6 on issue 3925 by [email protected]: JSON.parse leak
https://code.google.com/p/v8/issues/detail?id=3925
The main issue is that JSON parser falls back to SlowScanJsonString for
non-ascii strings.
This function overallocated 1K block for each string:
int length = Min(max_length, Max(kInitialSpecialStringLength, 2 * count));
https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/json-parser.h&rcl=1426635581&l=593
and then releases the unused suffix of the string in
return SeqString::Truncate(seq_string, count);
https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/json-parser.h&rcl=1426635581&l=679
This results in the following allocation pattern:
1. Allocate 1024 string.
2. Copy small number of characters (4 - 10) to the string.
3. Release the unused tail of the string (1020 - 1014).
Since all allocation requests are 1K, and the release tails cannot be
reused to fulfill future requests, this causes significant fragmentation in
heap.
GC doesn't keep up with that.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.