Skip to content

deps: V8: cherry-pick 687d865fe251

Opening this to test performance and memory benefits. Upd: good so far, marking as ready.

This should reduce the memory load and improve the speed in cases that heavily rely on Buffer usage.

Refs: https://github.com/v8/v8/commit/687d865fe251602ad1219cde7ae7cb38d4cb7471 Refs: https://github.com/nodejs/node/issues/1671

Original commit message:

[heap] Perform GCs on v8::BackingStore allocation

This adds heuristics to perform young and full GCs on allocation
of external ArrayBuffer backing stores.

Young GCs are performed proactively based on the external backing
store bytes for the young generation. Full GCs are performed only
if the allocation fails. Subsequent CLs will add heuristics to
start incremental full GCs based on the external backing store bytes.

This will allow us to remove AdjustAmountOfExternalMemory for
ArrayBuffers.

Bug: v8:9701, chromium:1008938
Change-Id: I0e8688f582989518926c38260b5cf14e2ca93f84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803614
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65480}

Merge request reports

Loading