Open Bug 1509158 Opened 6 years ago Updated 1 month ago

Make Text Drawing simpler and faster

Categories

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

enhancement

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Depends on 4 open bugs, Blocks 1 open bug)

Details

We spend quite a bit of WebRender display list building time going through nsTextFrame::DrawText. I suspect this code could be simplified and sped up further.

One option is to move more work into TextRun creation. See bug 1507975.
I'll continue to investigate what else there is to do.
Depends on: 1507975
Priority: -- → P2
Depends on: 1509155
Depends on: 1509167
Depends on: 1509358
Depends on: 1509423
Depends on: 1509424
As part of my investigations I saw 8.8% of nsDisplayText::RenderToContext being spent in nsTextFrame::EnsureTextRun. It looks like at least half of the time in this function is spent on
   if (textRun->GetFlags2() & nsTextFrameUtils::Flags::TEXT_IS_SIMPLE_FLOW) {
where I expect we're cache missing on the textRun for the first time and there's not much we can do here except improving our cache behaviour.
Depends on: 1510227
Blocks: stage-wr-next
No longer blocks: stage-wr-trains
Severity: normal → S3
Blocks: wr-displaylist-perf
No longer blocks: stage-wr-next
You need to log in before you can comment on or make changes to this bug.