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

[harfbuzz] reuse shaperOpentype instead of allocating a new one #162

Merged
merged 1 commit into from
May 2, 2024

Conversation

benoitkugler
Copy link
Contributor

This is a memory optimization : previously, the shaper field (with type *shaperOpentype) was allocated at each harbuzz.Shape call.

Removing the pointer and simply resetting the fields instead reduces memory usage.

This is very similar to #106

Copy link
Contributor

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

👍

@benoitkugler
Copy link
Contributor Author

I'll merge this change, since it is an internal optimization with no API change.

@benoitkugler benoitkugler merged commit 94e638b into main May 2, 2024
20 checks passed
@benoitkugler benoitkugler deleted the harfbuzz-alloc branch May 2, 2024 15:50
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.

2 participants