diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-01-20 21:58:37 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-20 21:58:37 +0530 |
commit | 28f64171cb4292cc1e8cf59525b0b9990eff160f (patch) | |
tree | d84d1cdf8a7f8b2de41b4c01230eb65ca8c872a9 /cli/tsc | |
parent | 40febd9dd1224a15a3bc877e2fdf010c4c893e0e (diff) |
fix(node): use `cppgc` for managing X509Certificate (#21999)
Introduces the first cppgc backed Resource into Deno.
This fixes the memory leak when using `X509Certificate`
**Comparison**:
```js
import { X509Certificate } from 'node:crypto';
const r = Deno.readFileSync('cli/tests/node_compat/test/fixtures/keys/agent1-cert.pem');
setInterval(() => {
for (let i = 0; i < 10000; i++) {
const cert = new X509Certificate(r);
}
}, 1000);
```
Memory usage after 5 secs
`main`: 1692MB
`cppgc`: peaks at 400MB
Diffstat (limited to 'cli/tsc')
0 files changed, 0 insertions, 0 deletions