-
Notifications
You must be signed in to change notification settings - Fork 52
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
Section
and allocations
#155
Comments
You are not mistaken. However, iirc my previous testing I would predict it not significant to the overall performance of drawing text With that said if such changes would positively impact the benchmarks, or some new meaningful benchmark, it would be interesting and could point the way to better designs. The other issue is changing away from Vec in You can run the existing benchmarks with, for example |
The
glyph_brush
API takes aSection
to queue, but theSection
internally uses aVec
to hold text. If I have a bunch of fields to write to the screen in different locations and with different bounds, it seems like each distinct field will force an allocation of a Vec with a capacity of 1.I'm not sure if I'm using the API wrong, or if I've missed something.
If this is how the API works, would you be interested in a PR that changes
Section
to use asmallvec
or other optimization for the scenario when aSection
only hold a single string?The text was updated successfully, but these errors were encountered: