Closed Bug 1423367 Opened 7 years ago Closed 6 years ago

We spend a lot of time during TextDrawing in nsIFrame::IsSelected

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 1503581

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-mvp] [triage])

About 27% of the time from a profile of Gmail
Blocks: 1422039
Whiteboard: [wr-mvp] [triage]
Is this still an issue? I took a quick look at the code, and it seems like the only non-trivial work (e.g. not checking flags) is https://searchfox.org/mozilla-central/source/dom/base/nsRange.cpp#198-281 which is doing a bunch of hashtable/linkedlist walking
Flags: needinfo?(jmuizelaar)
Another profile: https://perfht.ml/2LUufnT You can reproduce this pretty easily on https://github.com/mozilla/gecko-dev/blob/master/layout/painting/FrameLayerBuilder.cpp by selecting a lot of test.
Flags: needinfo?(jmuizelaar)
This is really bad with regular Gecko too https://perfht.ml/2LYjK30. We can probably postpone.
Blocks: stage-wr-next
No longer blocks: stage-wr-trains
Looking at the profile it's likely that it became worse with bug 651120. Olli has improvements to CompareDocumentPosition / ComputeIndexOf IIRC... Though maybe something smarter can be done to this selection code. This is particularly bad because tables, which is what GitHub uses for the view source stuff, create a bunch of different ranges.
hopefully fixed by Bug 1488278
Depends on: 1488278
Nope, how would that fix this. This was filed when we still had childarray with faster indexof(childnode). Bug 1488278 may help a bit with this in Nightly.
yeah, doesn't help much.
FWIW, that case somehow manages to break the indexof cache. Both the old and new version of that.
No longer depends on: 1488278
Is this a dupe of bug 1464632 , and bug 1503581 for the remaining work ?
Flags: needinfo?(a.beingessner)
Yep! Totally forgot this bug existed.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(a.beingessner)
Resolution: --- → DUPLICATE
No longer blocks: 1422039
You need to log in before you can comment on or make changes to this bug.