Details
-
Task
-
Resolution: Done
-
P2: Important
-
6.0
-
None
-
-
1f3dd3f5db16892739963168c2a76df6354b178c (qt/qtdeclarative/dev) a54621c231317c5777dea402215c30764ae96a2e (qt/qtdeclarative/5.15)
Description
One big bottle neck for text rendering when many nodes are added to the scene, is that each glyph node is preprocessed, just in case the distance field cache needs to be updated.
Preprocess is inherently slow, and some experimentation shows that in a huge stress test scene (2 million text items + around 2 million opaque items) we can go from 1 fps to 100 fps by removing the preprocessing on the glyph nodes.
The preprocessing was added so that we avoid resizing the glyph cache for every glyph node that comes along. Instead, we want to register all glyphs with the cache and then process once everything is in place.
The better approach is to do a special preprocessing only for the glyph caches. For most scene, this is just a couple of preprocess calls and no checks on visibility of the nodes.
The caches may have to adjust the geometries of each nodes once the cache is resized, but it should already know which nodes refer to it, so this should be easy.
Attachments
Issue Links
- is duplicated by
-
QTBUG-32997 Glyph Nodes use preprocess to prepare glyphs even though they do not need changes
-
- Closed
-