Closed benoitkugler closed 5 months ago
This is a memory optimization : previously, the shaper field (with type *shaperOpentype) was allocated at each harbuzz.Shape call.
shaper
*shaperOpentype
harbuzz.Shape
Removing the pointer and simply resetting the fields instead reduces memory usage.
This is very similar to https://github.com/go-text/typesetting/pull/106
I'll merge this change, since it is an internal optimization with no API change.
This is a memory optimization : previously, the
shaper
field (with type*shaperOpentype
) was allocated at eachharbuzz.Shape
call.Removing the pointer and simply resetting the fields instead reduces memory usage.
This is very similar to https://github.com/go-text/typesetting/pull/106