Skip to content

Conversation

@iola1999
Copy link

@iola1999 iola1999 commented Nov 21, 2024

close #367 .

I believe this might be related to how the underlying dependencies (resvg/fontdb) handle font loading, rather than an issue with resvg-js itself.

This PR adds a preloadFonts option to load font files into memory at initialization to avoid disk io. While this doesn't address the root cause in the underlying libraries, it provides a practical workaround for resvg-js users experiencing performance issues with text-heavy SVGs.

@iola1999 iola1999 marked this pull request as ready for review November 21, 2024 19:38
@iola1999 iola1999 changed the title [WIP] preload font files into memory to avoid frequent IO. preload font files into memory to avoid frequent IO. Nov 21, 2024
@yisibl yisibl force-pushed the main branch 2 times, most recently from 15dd771 to 34c1451 Compare January 9, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance issue: Frequent font file I/O operations when rendering SVG with text

1 participant