Open Bug 1408500 Opened 2 years ago Updated 3 months ago

[meta] TextDrawing is too slow


(Core :: Graphics: WebRender, enhancement, P3)




Tracking Status
firefox57 --- unaffected
firefox58 --- unaffected


(Reporter: jrmuizel, Unassigned)


(Blocks 1 open bug)


(Keywords: meta)

Often the largest chunk  of the time building the webrender display list is spent drawing text. Here's an example profile: Unfortunately, the profile is quite flat. With the most expensive function being gfxFont::DrawGlyphs. Still it would be good if we could put a dent in this time.
Depends on: 1408611
Depends on: 1408612
Whiteboard: [wr-mvp] [triage]
One thing we can consider doing is folding the glyph transformation all the way into serialization.

Here's what we do today:
- DrawOneGlyph() - read glyph, transform, store glyph in GlyphBufferAzure
- TextDrawTarget::FillGlyphs() - read glyph, transform, store glyph in TextDrawTarget's 'AutoTArray<GlyphInstance, 170> glyphs;'
- PushGlyphs() - read glyph and store in serialization buffer

Instead what we could potentially do is just:
- read glyph, transform, store glyph in serialization buffer
Priority: P3 → P2
Whiteboard: [wr-mvp] [triage] → [wr-mvp]
Depends on: 1412355
Priority: P2 → --
Summary: TextDrawing is too slow → [meta] TextDrawing is too slow
Whiteboard: [wr-mvp]
We do ok at this for now. If there are specific issues that we need to ship we can block on those individually.
No longer blocks: stage-wr-trains
You need to log in before you can comment on or make changes to this bug.