Closed Bug 1332578 Opened 7 years ago Closed 5 years ago

Caching info. on items from frame tree or DOM-tree may improve performance of painting

Categories

(Core :: Web Painting, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Performance Impact low
Tracking Status
firefox53 --- affected

People

(Reporter: sinker, Assigned: sinker)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [ps-radar])

Attachments

(2 files)

When doing ProcessDisplayItems(), it would be forced to collect information from frame tree, styles, and nsIContent for every items.  It is wasting time to access these memory and hurts CPU cache.  The idea is to keep a copy of key information on items to reduce the overhead of memory access.
Attached patch getbounds.diffSplinter Review
This patch caches the result of GetBounds() when items are wrapped by nsDisplayWrapList.  This is just an experiment, not a best choice.  The best choice is to cache the result when create items to get benefited by the fact that the relative data is already in CPU cache.  Anyway, it shows an improvement of 5% on nsDisplayList::PaintRoot().
try this patch basing on getbounds.diff.  Although getbounds.diff improves |PaintRoot()|, but it increases |nsIFrame::BuildDisplayListForStackingContext()|.  This patch removes doing caching in |nsDisplayWrapList|, but do it for the first time that GetBoundsCache() has been called.
Assignee: nobody → tlee
Blocks: 1204549
Thinker, are you still working on this?
Whiteboard: [qf:p3]
Whiteboard: [qf:p3] → [qf:p3][ps-radar]
Flags: needinfo?(tlee)
I have some bugs relating to this one.  They should block this one.
I will do it later.
Flags: needinfo?(tlee)
Keywords: perf
dupe of Retain-DL ?
Flags: needinfo?(matt.woodrow)
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(matt.woodrow)
Resolution: --- → WONTFIX
Performance Impact: --- → P3
Whiteboard: [qf:p3][ps-radar] → [ps-radar]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: