mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-12-05 18:55:28 +03:00
fix(editor): free the woff2 buffers after embedding a font
The woff2 module hands its result back as a vector living in its own
WebAssembly memory, which is freed only when asked to. It never was, so
every font subset for an SVG export ("embed fonts") leaked the
decompressed font and the compressed subset, for as long as the module
lived: the worker in a browser, the whole process on a server.
Measured over 2,000 subsets of the CJK font, with the garbage collector
forced: the process grew from 348 MB to 517 MB, and stays at 296 MB now.
Claude Fable 5.2, effort 30