-
Jeremy Roman authored
The parser holds a single vector whose backing storage is reused in calls to ParseJsonObject, so that once we reach the peak number of unstored properties no more allocations are required. This improves performance of parsing inputs like those in Speedometer VanillaJS by about 2% in my local measurement, and would presumably do better on more pathological inputs. This should also have the side effect of reducing peak memory usage at this time slightly, since we do fewer zone allocations which cannot be freed until the parse finishes. Bug: chromium:771227 Change-Id: I8aa1514b37a74f82539f95f94292c8fa1582d66a Reviewed-on: https://chromium-review.googlesource.com/789511Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#49693}
d3104923