SERVER-131930ClosedDuplicate
Warm up WASM scopes before running MozJS queries
h2. Telemetry insights → tuning & future optimizations From the {{11600001}} (per-invoke) and {{11600002}} (scope-create) data: # *Per-invoke {{$where}} is cheap and stable* (~20–225µs, flat {{{}linearMemoryBytes{}}}/{{{}gcHeapBytes{}}}). So the compiled-function cache and steady-state execution are fine — {*}no tuning needed on the invocation path{*}, and the "memory growth" hypothesis is disproven. Good to know we don't need to touch GC/reuse-count limits for correctness. # *{{idleBri