Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use lru to cache font layout to fix memory leak #1527

Open
abihf opened this issue Jun 17, 2024 · 1 comment · May be fixed by #1528
Open

Please use lru to cache font layout to fix memory leak #1527

abihf opened this issue Jun 17, 2024 · 1 comment · May be fixed by #1528

Comments

@abihf
Copy link

abihf commented Jun 17, 2024

Bug Report

Description of the problem

There's memory leaks when using custom fonts with huge data. I can disable fontLayoutCache but the performance is 3x slower.

I think we should use lru instead of simple object here

Code sample

//TODO:

Your environment

  • pdfkit version: 0.15.0
  • Node version: 20.14.0
  • Browser version (if applicable): -
  • Operating System: Mac and Linux
@blikblum
Copy link
Member

Can you provide a PR?

@abihf abihf linked a pull request Jun 22, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

2 participants