From 0234068f7f5d050b1c68bb02776f1da42e4ec0cf Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sat, 28 Apr 2018 13:00:04 +0200 Subject: [PATCH] doc: improve note on zlib APIs threadpool usage Raise awareness against the catastrophic memory fragmentation that can be created while using the asynchronous zlib APIs. PR-URL: https://github.com/nodejs/node/pull/20380 Refs: https://github.com/nodejs/node/issues/8871 Reviewed-By: Ruben Bridgewater Reviewed-By: Anatoli Papirovski --- doc/api/zlib.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 0e66abdcfb0766..e6c5504bff5dbb 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -48,9 +48,9 @@ zlib.unzip(buffer, (err, buffer) => { ## Threadpool Usage Note that all zlib APIs except those that are explicitly synchronous use libuv's -threadpool, which can have surprising and negative performance implications for -some applications, see the [`UV_THREADPOOL_SIZE`][] documentation for more -information. +threadpool. This can lead to surprising effects in some applications, such as +subpar performance (which can be mitigated by adjusting the [pool size][]) +and/or unrecoverable and catastrophic memory fragmentation. ## Compressing HTTP requests and responses @@ -777,9 +777,9 @@ Decompress a chunk of data with [`Unzip`][]. [`Inflate`]: #zlib_class_zlib_inflate [`InflateRaw`]: #zlib_class_zlib_inflateraw [`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray -[`UV_THREADPOOL_SIZE`]: cli.html#cli_uv_threadpool_size_size [`Unzip`]: #zlib_class_zlib_unzip [`options`]: #zlib_class_options [`zlib.bytesWritten`]: #zlib_zlib_byteswritten [Memory Usage Tuning]: #zlib_memory_usage_tuning +[pool size]: cli.html#cli_uv_threadpool_size_size [zlib documentation]: https://zlib.net/manual.html#Constants