Open Bug 920659 Opened 11 years ago Updated 1 year ago

Peacekeeper renderPhysics test slower than in Chrome

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: jandem, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file renderPhysics.zip
Yet Another Peacekeeper Test. Original test here: http://www.peacekeeper.therichins.net/test3.html

I verified the numbers reported by the attached version match the original benchmark results in both Firefox and Chrome. The original test runs for 30 seconds.

Chrome 31: 78 fps
Nightly:   57 fps

Interestingly, the test has: 

    this.balls[i].style.MozTransform = "rotate(" + this.rotations[i] + "deg)"; 

And indeed, the "balls" (flowers) don't rotate in Chrome. Commenting out this line doesn't improve our score though.

I see some time in str_replace for calls like this:

    ball1.style.left.replace("px", "")

Will look closer into the JS stuff. bz, can you see what's going on on the DOM/layout side? Thanks!
Flags: needinfo?(bzbarsky)
On the DOM/layout side I see this:

* 24% of the time is spent doing get_left and get_top.  That's fundamentally bug 608880.
  We should remeasure once bug 608915 lands.
* 8% is restyle processing.
* 16% is painting.

But note that those are percentages of _total_ time, across all threads.  About 25% of the time is on the compositor thread, so the above percentages should probably be higher.
Depends on: 608880, 608915
Flags: needinfo?(bzbarsky)
I should also note that for me (on Mac), I see Chrome at about 70fps and a current nightly at 82fps.  If I apply the patch from bug 608915, we're at 85fps.
(In reply to Boris Zbarsky [:bz] from comment #2)
> I should also note that for me (on Mac), I see Chrome at about 70fps and a
> current nightly at 82fps.  If I apply the patch from bug 608915, we're at
> 85fps.

Is that with the ToShortest() patch or a different one?  (Nice to know it's still a speedup!)
Flags: needinfo?(bzbarsky)
That's with the ToShortest() patch that's in that bug.
Flags: needinfo?(bzbarsky)
(In reply to Boris Zbarsky [:bz] from comment #2)
> I should also note that for me (on Mac), I see Chrome at about 70fps and a
> current nightly at 82fps.  If I apply the patch from bug 608915, we're at
> 85fps.

You're right, I see the same here after updating my Nightly (also Mac). I will check if it's really a bug that landed the past few days...
Depends on: 934544
With a Nightly where bug 608915 I see 55 fps, while on Chrome 30 I see 64 fps.
where bug 608915 is fixed*, sorry!
On my hardware, on the testcase in this bug, I see Chrome at 60fp, while we're at 90fps.  Again, on Mac.

So it's possible that the remaining issues here are Windows-specific in some way...
On 64bit Linux Nightly 88fp, Chromium 110fp.
On Win7 Nightly 57fps, Chromium 86fps.
Based on Gecko profiler, we spend more time inside refresh driver on Windows, if I interpret the profiler correctly. All about display list and rasterization.
Someone more knowledgeable about gfx could take a look.
Maybe :bas wants to have a look if it's graphics that's holding us back on windows only.
Flags: needinfo?(bas)
Is this still a problem and/or do we still care about this?
Flags: needinfo?(bas)
It is still a problem and we do still care.
On linux I see Nightly 73, Chromium 90

On Windows Nightly 58, Chrome 75

(Different Windows and Linux machines).

Comment 11 is still valid. And from comment 1, the part about bug 608880 is showing up still significantly.
Flags: needinfo?(bas)
(In reply to Olli Pettay [:smaug] from comment #14)
> It is still a problem and we do still care.
> On linux I see Nightly 73, Chromium 90
> 
> On Windows Nightly 58, Chrome 75
> 
> (Different Windows and Linux machines).
> 
> Comment 11 is still valid. And from comment 1, the part about bug 608880 is
> showing up still significantly.

I'll have a look, obviously bug 608880 is not really in graphics domain. I'll have a look if there's actual graphics work here taking up significant time and being eligible for improvement.
Flags: needinfo?(bas)
I should note my results on windows are different:

Firefox: 90
Chrome: 57
IE: 49
Edge: 47

Could you post your about:support graphics section?

Also, firefox seems to be the only browser where the seeds are also 'rotating' around. Is this correct?
Flags: needinfo?(bugs)
Yeah, bug 608880 has nothing to do with graphics, but comment 11 is possibly. Though it is also about display list stuff.

My Windows laptop gfx:
    Adapter Description     Intel(R) HD Graphics 4000
    Adapter Drivers igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32
    Adapter RAM     Unknown
    Asynchronous Pan/Zoom   wheel input enabled; touch input enabled
    Device ID       0x0166
    Direct2D Enabled        true
    DirectWrite Enabled     true (10.0.10586.0)
    Driver Date     6-16-2015
    Driver Version  10.18.10.4242
    GPU #2 Active   false
    GPU Accelerated Windows 1/1 Direct3D 11 (OMTC)
    Subsys ID       00000000
    Supports Hardware H264 Decoding Yes; Using D3D11 API
    Vendor ID       0x8086
    WebGL Renderer  Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)
    windowLayerManagerRemote        true
    AzureCanvasAccelerated  0
    AzureCanvasBackend      direct2d 1.1
    AzureContentBackend     direct2d 1.1
    AzureFallbackCanvasBackend      cairo
Flags: needinfo?(bugs)
(In reply to Olli Pettay [:smaug] from comment #17)
> Yeah, bug 608880 has nothing to do with graphics, but comment 11 is
> possibly. Though it is also about display list stuff.
> 
> My Windows laptop gfx:
>     Adapter Description     Intel(R) HD Graphics 4000
>     Adapter Drivers igdumdim64 igd10iumd64 igd10iumd64 igdumdim32
> igd10iumd32 igd10iumd32
>     Adapter RAM     Unknown
>     Asynchronous Pan/Zoom   wheel input enabled; touch input enabled
>     Device ID       0x0166
>     Direct2D Enabled        true
>     DirectWrite Enabled     true (10.0.10586.0)
>     Driver Date     6-16-2015
>     Driver Version  10.18.10.4242
>     GPU #2 Active   false
>     GPU Accelerated Windows 1/1 Direct3D 11 (OMTC)
>     Subsys ID       00000000
>     Supports Hardware H264 Decoding Yes; Using D3D11 API
>     Vendor ID       0x8086
>     WebGL Renderer  Google Inc. -- ANGLE (Intel(R) HD Graphics 4000
> Direct3D11 vs_5_0 ps_5_0)
>     windowLayerManagerRemote        true
>     AzureCanvasAccelerated  0
>     AzureCanvasBackend      direct2d 1.1
>     AzureContentBackend     direct2d 1.1
>     AzureFallbackCanvasBackend      cairo

Hrm, this is interesting, I'm also on D2D 1.1 and Intel HD graphics (although 5000 series), but I'm seeing way better performance on Firefox than on Chrome. Are you seeing the seeds rotating on chrome at all?
Hrm, so on another machine, I do get slightly better perf on Chrome, however on Firefox the dandelion seeds are rotating and on chrome they're not.... what's the right behavior?
Flags: needinfo?(bugs)
oh, indeed they are not rotating in chrome, nor in Edge. (looks like Edge is quite slow here.)
Let me check how to prevent rotating in FF too and then do comparison.
Flags: needinfo?(bugs)
Commenting this.balls[i].style.MozTransform = "rotate(" + this.rotations[i] + "deg)"; out seems to be enough. On linux Nightly 99, Chrome 90. On Windows Nightly 58, Chrome 89, Edge 19. 
(My linux machine is significantly more powerful than the Windows one)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: