-
Notifications
You must be signed in to change notification settings - Fork 7
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
Trim down or minimize memory usage #18
Comments
How urgent is this optimization ? |
Thanks for the answer. I would personally say that it is relatively important if we want to avoid the large memory increase before publishing the v2.3.0 release. While all of it likely isn't coming from here, I am currently seeing a doubling of memory usage in my application and that isn't very nice |
I've started working on a new version of the package which will remove this issue (by removing unused dependency). |
Great. I'll try to have a look at that later in the week :) |
I ran |
We have noticed, partly based on the comment here, that the following map is massive:
textlayout/fonts/glyphsnames/glyphs.go
Line 118 in f0394e7
A map of, according to the comment, 2462 different strings result in a lot of memory usage and quite a huge piece of binary size increases. Can this map be reduced in any way, only created when actually needed or something like that? It might make sense to convert it into one large switch-case (especially now that Go 1.19 uses jump tables for large int and string switch cases) as the Go compiler more easily can optimize that but it would have to be tested to make sure that it isn't noticeably slower.
The text was updated successfully, but these errors were encountered: