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

NEW
Assigned to

Status

()

Core
Layout: Web Painting
a year ago
7 months ago

People

(Reporter: sinker, Assigned: sinker)

Tracking

(Blocks: 2 bugs, {perf})

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 affected)

Details

(Whiteboard: [qf:p3][ps-radar])

Attachments

(2 attachments)

(Assignee)

Description

a year ago
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.
(Assignee)

Comment 1

a year ago
Created attachment 8828714 [details] [diff] [review]
getbounds.diff

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().
(Assignee)

Comment 2

a year ago
Created attachment 8828717 [details] [diff] [review]
without-docacheforitems.diff

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

Updated

a year ago
Blocks: 1204549

Comment 3

a year ago
Thinker, are you still working on this?

Updated

a year ago
Whiteboard: [qf:p3]
Whiteboard: [qf:p3] → [qf:p3][ps-radar]

Updated

a year ago
Flags: needinfo?(tlee)
(Assignee)

Comment 4

a year ago
I have some bugs relating to this one.  They should block this one.
I will do it later.
Flags: needinfo?(tlee)
You need to log in before you can comment on or make changes to this bug.