You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #11515 (fix for #11453, handle-id exhaustion).
#11515 makes crypto hash/HMAC/cipher/sign/StringDecoder handles GC-reclaimable, proving an id unreachable with full traces before reuse. That fixes the crash after ~200k requests (1.6M requests now served with flat RSS) and cuts backend RSS by 43%. The cost is extra full-trace work:
+2.6% instructions on the http backend probe;
+9.8% on a loop that only does createHash.
The base build avoided that cost only by leaking every handle until it crashed.
To remove the remaining cost without giving back the memory win: have the compiler recognise non-escaping handle chains such as createHash(alg).update(x).digest(enc) and createHmac(...).update(...).digest(...) (the dominant per-request pattern). Then either:
skip registering a handle at all (compute the digest directly from a stack-held state); or
release the id immediately at the chain's end, because escape analysis proves no JS reference survives.
Measure with the #11515 microbenches under /tmp/perry-bench-lock.d; the target is the pre-#11515 instruction count with #11515's bounded RSS.
Activity
perf(crypto): module-scope guard, codegen lowering tests, gap test (#…
perf(crypto): recognise CommonJS require('crypto') aliases and hoiste…
perf(crypto): handle-free createHash/createHmac for non-escaping chai…
perf(crypto): module-scope guard, codegen lowering tests, gap test (#…
perf(crypto): recognise CommonJS require('crypto') aliases and hoiste…
crypto: store-site audit markers; drop a bare address check (#11516)
perf(crypto): handle-free createHash/createHmac for non-escaping chai…
perf(crypto): module-scope guard, codegen lowering tests, gap test (#…
perf(crypto): recognise CommonJS require('crypto') aliases and hoiste…
crypto: store-site audit markers; drop a bare address check (#11516)
perf(crypto): handle-free createHash/createHmac for non-escaping chai…
perf(crypto): module-scope guard, codegen lowering tests, gap test (#…
perf(crypto): recognise CommonJS require('crypto') aliases and hoiste…
crypto: store-site audit markers; drop a bare address check (#11516)