[go: up one dir, main page]

Skip to content

Monkey patch pako to map inflate to the inflate function from zlib

git stores data compressed with zlib. The git client must inflate this data in order to read it. Currently, isomorphic-git uses pako to perform this step instead of the built-in zlib.inflate function in Node.js. isomorphic-git uses pako to meet its portability goals. pako is written in JavaScript, making it substantially slower than the zlib.inflate function provided by Node.js, which uses native code (i.e., accelerated). We likely cannot get the isomorphic-git project to stop using pako, but it is possible to monkey patch the inflate function so that under the covers it uses zlib.inflate instead.

The result of this change is that Antora will be substantially more efficient at reading data from git repositories, which will be especially noticeable for large repositories.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information