Skip to content

Conversation

@gustavobelo-dev
Copy link
Contributor

@gustavobelo-dev gustavobelo-dev commented Nov 1, 2025

Description

There is an issue related to load fonts api when we have several golden tests. In my project we created golden tests to more than 300 icons, and it was not possible to run because the package crashes with out of memory.
I analyze and validate that it has an issue related to load fonts repeatedly, so, I created a local register about fonts already loaded. I tested this solution with multiple tests and files and it works well. I added an example test of the issue but flags as skipped to avoid generating hundreds of files unnecessarily.

I know that another PR try to externalize the loadFonts method and it was suggested to cache the information could be better, so I try it.

Video running the current version of the package:
https://github.com/user-attachments/assets/624b05ef-f06b-4e61-9b88-0e78fb0faa8c

Video running the PR version:
https://github.com/user-attachments/assets/a866e46a-285f-4c8e-80b4-5f68789efd48

If you prefer, I can made this implementation optional but I believe that can be a necessary solution.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@marcossevilla
Copy link
Collaborator

domain lgtm

Copy link
Contributor

@btrautmann btrautmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain lgtm 🚀
platform lgtm 💪

@btrautmann btrautmann merged commit 089eecc into Betterment:main Nov 5, 2025
8 checks passed
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.

3 participants