Skip to content

Commit 8dc7c88

Browse files
lpincaaddaleax
authored andcommitted
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: #20380 Refs: #8871 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
1 parent d4f507b commit 8dc7c88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/zlib.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ zlib.unzip(buffer, (err, buffer) => {
4848
## Threadpool Usage
4949

5050
Note that all zlib APIs except those that are explicitly synchronous use libuv's
51-
threadpool, which can have surprising and negative performance implications for
52-
some applications, see the [`UV_THREADPOOL_SIZE`][] documentation for more
53-
information.
51+
threadpool. This can lead to surprising effects in some applications, such as
52+
subpar performance (which can be mitigated by adjusting the [pool size][])
53+
and/or unrecoverable and catastrophic memory fragmentation.
5454

5555
## Compressing HTTP requests and responses
5656

@@ -777,9 +777,9 @@ Decompress a chunk of data with [`Unzip`][].
777777
[`Inflate`]: #zlib_class_zlib_inflate
778778
[`InflateRaw`]: #zlib_class_zlib_inflateraw
779779
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
780-
[`UV_THREADPOOL_SIZE`]: cli.html#cli_uv_threadpool_size_size
781780
[`Unzip`]: #zlib_class_zlib_unzip
782781
[`options`]: #zlib_class_options
783782
[`zlib.bytesWritten`]: #zlib_zlib_byteswritten
784783
[Memory Usage Tuning]: #zlib_memory_usage_tuning
784+
[pool size]: cli.html#cli_uv_threadpool_size_size
785785
[zlib documentation]: https://zlib.net/manual.html#Constants

0 commit comments

Comments
 (0)