Each call of validate function will consume about 16MB! of array buffer memory. Node 18.
const SAMLValidator = require('@authenio/samlify-node-xmllint');
const XML = `<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="aaf23196-1773-2113-474a-fe114412ab72"
Version="2.0"
IssueInstant="2004-12-05T09:21:59Z">
</samlp:AuthnRequest>`;
console.log(process.memoryUsage());
SAMLValidator.validate(XML);
console.log(process.memoryUsage());
SAMLValidator.validate(XML);
console.log(process.memoryUsage());
Memory before call:
{
rss: 41086976,
heapTotal: 14307328,
heapUsed: 9071328,
external: 406411,
arrayBuffers: 16610
}
Memory after 2 calls:
{
rss: 58294272,
heapTotal: 18771968,
heapUsed: 13314016,
external: 34080083,
arrayBuffers: 33654784
}
Each call of
validatefunction will consume about 16MB! of array buffer memory. Node 18.Memory before call:
Memory after 2 calls: