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

[BaseIFilter] use cache to avoid recursing too much when gathering locations from component glyphs #829

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

anthrotype
Copy link
Member

@anthrotype anthrotype commented Apr 8, 2024

Some fonts have hundreds of masters and many nested components, leading the BaseIFilter.locationsFromComponentGlyphs method to seemingly hang in a very deep recursion loop.
Adding a cache avoids re-doing the same work (of gathering locations of all nested components of a composite glyph) over and over again.

…cations from component glyphs

Some fonts have hundred of masters and many nested components, leading to this method seemingly hanging forever. Adding a cache avoids redoing the same work of gathering locations of all components in a composite glyph over and over again.
@anthrotype anthrotype merged commit 8e9e6eb into main Apr 8, 2024
9 checks passed
@anthrotype anthrotype deleted the memoize-locations-from-components branch April 8, 2024 15:42
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.

1 participant