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

Slow DirectWrite text rendering with many TextColor range attributes #390

Open
ForLoveOfCats opened this issue Jan 25, 2021 · 0 comments
Open
Labels
perf performance related issue piet-direct2d issue in the direct2d backend text

Comments

@ForLoveOfCats
Copy link
Collaborator

ForLoveOfCats commented Jan 25, 2021

Piet version: 0.3.2 (as pulled in by Druid, Windows tests built with linebender/druid@b40a363)
Reproduction: https://gist.github.com/ForLoveOfCats/0919bbb3df3eb122f97fd07e79fd501a

In the above code the "normal" text renders between ~3 to ~6 ms on my Win10 system (Ryzen 5 3500U mobile APU, fully updated OS at time of writing) while the line with many TextColor range attributes takes between ~30 to ~50 ms to render. For comparison the Pango powered Linux text PR renders the "normal" text in 0 ms and the text with many range attributes in ~2 ms (different machine, Ryzen 3 3200G w/R7 360).

While the render time for the marked up text is exceedingly bad it also appears that the normal text rendering is also rather slow when compared to Pango at the very least (I don't have access to a Mac to test the CoreText backend)

@xStrom xStrom added text perf performance related issue piet-direct2d issue in the direct2d backend labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf performance related issue piet-direct2d issue in the direct2d backend text
Projects
None yet
Development

No branches or pull requests

2 participants