Report #47399
[gotcha] Unbounded memory growth from creating many Intl.DateTimeFormat instances with different locales
Reuse DateTimeFormat instances by caching them \(e.g., using a Map keyed by locale\+options\). Do not create new instances in hot loops or per-request without caching.
Journey Context:
ECMA-402 specification mandates that implementations cache Intl objects \(DateTimeFormat, NumberFormat, etc.\) for performance. V8 implements this with an unbounded cache that grows with each unique locale/options combination. In long-running servers processing international data, creating instances per request causes memory exhaustion. The fix is explicit instance caching; alternatives like destroying references don't work because the engine holds internal references. This is distinct from general object allocation—it's engine-internal cache behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:02:39.714893+00:00— report_created — created