Open Bug 836409 Opened 11 years ago Updated 2 years ago

requestAnimationFrame loops can happen without painting

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: taras.mozilla, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

I noticed that if I do requestAnimationFrame loops during pageload and poll mozPaintCount, a large percentage of requestAnimationFrame-callback happen without a change in mozPaintCount.  I have this setup on my blog and ratio of paintless-RAF-callbacks to paintcounts before onload can be 40 to 16.
We do suppress painting during page load. By default it is 250 ms, or page load, whichever comes first. You can change the 250 value using the pref nglayout.initialpaint.delay in order to test.
(In reply to Timothy Nikkel (:tn) from comment #1)
> We do suppress painting during page load. By default it is 250 ms, or page
> load, whichever comes first. You can change the 250 value using the pref
> nglayout.initialpaint.delay in order to test.

There must be something else at play here. 40 suppressed RAF paints accounts for ~664ms
Attached file standalone testcase
So a couple of things
a) Tn you are right. We fire of a paintless stream of RAFs that lasts ~ nglayout.initialpaint.delay before painting starts.

I think this is a problematic behavior.
We probably should schedule the initial RAF to take |nglayout.initialpaint.delay| - 16.6ms

b) This one is pretty obvious. mozPaintCount only reports paints, so if there was no paint requested by the RAF to force to keep things painting, no painting is done.
Attachment #708227 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: