Slow performance on CoffeePhysics

RESOLVED DUPLICATE of bug 732471

Status

()

RESOLVED DUPLICATE of bug 732471
7 years ago
5 years ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

7 years ago
I'm seeing this on the profiling branch on OS X which doesn't seem to be using jemalloc. I took a look in Instruments and it looks this might be caused by us contending on malloc while releasing the garbage. Either way, this demo seems to be hard on our gc. FWIW, it runs much better in Chrome.
Could you post some of the GC log entries from the error console (with javascript.options.mem.log enabled)? On Linux I'm getting 12ms compartment GCs, which is actually pretty awesome. We've seen problems like this on Macs before, but nothing reproducible.
This is what I get on Nightly.

GC(T+41.9) TotalTime: 4.0ms, Type: compartment, MMU(20ms): 79%, MMU(50ms): 91%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 2.2, mark-roots: 1.3, mark-other: 0.0, sweep: 1.4, sweep-obj: 0.1, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.3, xpconnect: 0.7, deallocate: 0.0

GC(T+31.9) TotalTime: 3.8ms, Type: compartment, MMU(20ms): 80%, MMU(50ms): 92%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 2.0, mark-roots: 1.1, mark-other: 0.1, sweep: 1.4, sweep-obj: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.3, xpconnect: 0.7, deallocate: 0.0

GC(T+73.0) TotalTime: 4.8ms, Type: compartment, MMU(20ms): 75%, MMU(50ms): 90%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 2.5, mark-roots: 1.5, mark-other: 0.1, sweep: 1.8, sweep-obj: 0.1, sweep-string: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.5, xpconnect: 0.9, deallocate: 0.0
Pauses got a little longer:

GC(T+167.5) TotalTime: 6.1ms, Type: compartment, MMU(20ms): 69%, MMU(50ms): 87%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 3.0, mark-roots: 2.0, mark-other: 0.1, sweep: 2.4, sweep-obj: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.4, xpconnect: 1.4, deallocate: 0.0
I get 12fps on Nightly and 43-ish on a release version of Chrome.
To me it looks like the biggest problem is slow frame rate. GC may be an issue as well.
Blocks: 579390
Summary: GC pauses on http://soulwire.co.uk/coffeephysics/ → Slow performance on CoffeePhysics

Comment 6

7 years ago
I noticed it this morning. 
I get 4 fps on Nightly and 60 fps on Chrome.

According to Firebug's profiler, JavaScript seems to spend most of its time (63%) in http://soulwire.co.uk/coffeephysics/compiled/behaviour/Collision.js at line 20.

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 732471
You need to log in before you can comment on or make changes to this bug.