-
Notifications
You must be signed in to change notification settings - Fork 13
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
reuse storage when parsing multiple glyphs #221
Comments
I like. Buffer per thread? |
yea, something like this. I'm not sure how best to do this with edit: looks possible, there are some tools for building custom threadpools with thread-local state etc. |
This would also mean we'd need to stop allocating new sub-buffers while parsing? |
what sub buffers do we allocate? |
Line 142 in 47ff135
This one for example. |
mm, that is a funny one, I didn't remember that. That would be unchanged, although in theory we could also have a reusable buffer for that. I don't see any others, do you? |
That's probably the only one :) |
just noticed this, but currently during parsing we allocate storage for each individual glyph that we parse. It would not be that hard to reuse a single allocation between parsings.
Ultimately this will not be a big win and we shouldn't lose too much sleep over it, but also it should be fairly easy and it shouldn't require breaking changes (at the very least we can just add API to do this internally when we're loading layers.)
One complication is how to share buffers between parsers across threads when we're loading in parallel. 🤔
The text was updated successfully, but these errors were encountered: