From 825d08976386099121932d790d44eff1f159b668 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 11 Feb 2020 18:32:33 +0100 Subject: [PATCH] crypto: fix performance regression https://github.com/nodejs/node/commit/e559842188f541b884abff2ffad4d2d3e1b841a6 made writable/readable computed with a legacy mode if the properties are written to. LazyTransform still unecessarily wrote to these properties causing a performance regression. Fixes: https://github.com/nodejs/node/issues/31739 PR-URL: https://github.com/nodejs/node/pull/31742 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen --- lib/internal/streams/lazy_transform.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js index 6584159095af39..69bba428af07f5 100644 --- a/lib/internal/streams/lazy_transform.js +++ b/lib/internal/streams/lazy_transform.js @@ -19,8 +19,6 @@ module.exports = LazyTransform; function LazyTransform(options) { this._options = options; - this.writable = true; - this.readable = true; } ObjectSetPrototypeOf(LazyTransform.prototype, stream.Transform.prototype); ObjectSetPrototypeOf(LazyTransform, stream.Transform);