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

Performance: Cache results of hb_shape calls #115

Closed
bryphe opened this issue Dec 18, 2018 · 1 comment · Fixed by #155
Closed

Performance: Cache results of hb_shape calls #115

bryphe opened this issue Dec 18, 2018 · 1 comment · Fixed by #155
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bryphe
Copy link
Member

bryphe commented Dec 18, 2018

As can be seen from the profile here:

image

We spend a lot of unnecessary time shaping text over and over. We should be caching or memoizing this call - the shape results are constant for a (font family, text) tuple.

@bryphe
Copy link
Member Author

bryphe commented Dec 20, 2018

The expensive call is here:
https://github.com/bryphe/revery/blob/fb0bb59faaa325245c0a669a4ecb06af5c6b9292/src/UI/FontRenderer.re#L43

Work needed:

@bryphe bryphe added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant