Closed Bug 1613053 Opened 4 years ago Closed 2 years ago

Simplify WebRender's internal storage of clip chains

Categories

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

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Unassigned)

References

(Blocks 1 open bug)

Details

Following up on a Berlin allhands discussion about frame building performance, I'll try to reproduce Glenn's wording as best as I can: Clip chains are currently stored as an intrusive linked list within a vector (where links are indices). There is a bunch of complicated (and expensive?) code for generating the proper chains.

Glenn proposes storing chip chains as ranges of clips in a vector, at the expense of duplicating common parents, but making building and iterating clip chains more straightforward and cheap.

For reference, the percentage of total frame building time spent in clipping related functions when scrolling gmail's thread list (measured on a xps13 laptop):

  • ClipStore::build_clip_chain_instance: 2%
  • ClipStore::set_active_clips: 1.5%
  • ClipChainStack::push_clip: 1.5%
  • BrushSegment::update_clip_task: 0.5%
  • ...a few others below 0.1%

The wins to be had look modest on this particular testcase (where frame building struggles). Other more clipping-heavy pages will probably look different, I'll update the numbers if I run into one.

This is no longer relevant, due to the work in bug #1779952.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.