From 8aa938aa89dc300edc8f1f0b4b61d8d34e75ed22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Ara=C3=BAjo?= Date: Mon, 9 Nov 2026 14:50:42 -0300 Subject: [PATCH] src: stop shrinking async resource stack on pop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pop_async_context() called shrink_to_fit() on every pop. The stack is usually empty once a callback returns, so libc++ and MSVC free the deque's storage and the next push allocates it again, several times per HTTP request. Assisted-by: Claude Code Signed-off-by: Guilherme Araújo --- src/env.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/env.cc b/src/env.cc index c30b6e2f5049..50737c3dead3 100644 --- a/src/env.cc +++ b/src/env.cc @@ -205,7 +205,6 @@ bool AsyncHooks::pop_async_context(double async_id) { } else { native_execution_async_resources_.resize(offset); } - native_execution_async_resources_.shrink_to_fit(); } if (js_execution_async_resources()->Length() > offset) [[unlikely]] {