Open Bug 1810275 Opened 1 year ago Updated 21 days ago

On a JS demo (http://nkunited.de/blog/particles/landscape/SinusLandscape.min.html) Nightly is slower than Chrome (in certain cases)

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

  1. Go to http://nkunited.de/blog/particles/landscape/SinusLandscape.min.html

  2. Click on "Open Controls" -> General Settings
    2.1Increase the "Particle Amount" to maximum

3.Click on Open Controls -> Display settings
Check "Z-sorting"

AR: Nightly is much more slower than Chrome.

Nightly: https://share.firefox.dev/3kf5tps
Chrome: https://share.firefox.dev/3CPhQyZ

Are you sure that Chrome trace was with Z-sorting enabled? In your Nightly profile I see a lot of time is spent sorting an array but I don't see that in your Chrome profile at all. Looking at the code, this sorting only happens if Z-sorting is enabled.

Flags: needinfo?(mayankleoboy1)

(In reply to Jan de Mooij [:jandem] from comment #1)

Are you sure that Chrome trace was with Z-sorting enabled? In your Nightly profile I see a lot of time is spent sorting an array but I don't see that in your Chrome profile at all. Looking at the code, this sorting only happens if Z-sorting is enabled.

https://share.firefox.dev/3QGREfN
The first 5 seconds are without z-sorting. After that, I enabled z-sorting.

Flags: needinfo?(mayankleoboy1) → needinfo?(jdemooij)

(In reply to Mayank Bansal from comment #2)

https://share.firefox.dev/3QGREfN
The first 5 seconds are without z-sorting. After that, I enabled z-sorting.

Ah yes, now the sort callback shows up, as "(anonymous)". I suspect this is mostly a sorting thing.

Severity: -- → N/A
Flags: needinfo?(jdemooij)
Priority: -- → P3
See Also: → 1855968

Profile with latest Nightly(that contains fixes from bug 1884360) : https://share.firefox.dev/3TXVLYc

This is what I get on the latest Nightly (which contains fix from bug 1889685 : https://share.firefox.dev/3WoXNlx

How does performance compare to Chrome now? Eyeballing the profile, we spend a lot less (relative) time sorting now.

Flags: needinfo?(mayankleoboy1)

Subjectively, Nightly feels slower.

Nightly: https://share.firefox.dev/3JFZZ0o
Chrome: https://share.firefox.dev/3Wm0HaB

Flags: needinfo?(mayankleoboy1)
Flags: needinfo?(jdemooij)

One remaining difference is the number of comparator calls: in Nightly that's about 1.2-1.3 million calls per sort call (it varies quite a bit), but with Chrome it's 0.9-0.95 million. So we're doing more work.. V8 uses Timsort so this could be bug 720677, or something else.

Safari has fewer comparator calls than us, but they're pretty similar (they're closer to us than to Chrome).

Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: