Closed Bug 619761 Opened 15 years ago Closed 2 years ago

Google blob WebGL sample 2x faster in Chromium

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: humph, Unassigned)

References

()

Details

(Keywords: perf)

I'm not sure if this belongs here or in Canvas:WebGL, but running this demo, I'm about 2x slower on trunk than in Chromium (based on fps readings on that page). Shark shows a bunch of js at the top of the profile instead of gl: 8.4% 8.4% XUL js::mjit::stubs::GetElem(js::VMFrame&) 8.2% 8.2% XUL TypedArrayTemplate<float>::obj_getProperty(JSContext*, JSObject*, JSObject*, long, js::Value*) 4.6% 4.6% XUL void js::mjit::stubs::SetElem<0>(js::VMFrame&) 2.8% 2.8% XUL TypedArrayTemplate<float>::obj_setProperty(JSContext*, JSObject*, long, js::Value*, int) 2.7% 2.7% XUL NameOp(js::VMFrame&, JSObject*, bool) 2.6% 2.6% libSystem.B.dylib __memcpy 2.0% 2.0% XUL js_NativeGet(JSContext*, JSObject*, JSObject*, s::Shape const*, unsigned int, js::Value*) 1.3% 1.3% XUL js::mjit::stubs::Equal(js::VMFrame&) 1.1% 1.1% mach_kernel vm_map_lookup_entry 1.0% 1.0% XUL TypedArrayTemplate<int>::obj_getProperty(JSContext*, JSObject*, JSObject*, long, js::Value*) 1.0% 1.0% Unknown Library 0x1193172c0 [unknown] 1.0% 1.0% XUL EqualityCompiler::update() 1.0% 1.0% XUL CallPropertyOp(JSContext*, JSObject*, long, js::Value*, JSCallPropertyKind, int) 0.8% 0.8% XUL DisabledGetElem(js::VMFrame&, js::mjit::ic::GetElementIC*) 0.7% 0.7% XUL js::mjit::stubs::CallName(js::VMFrame&) 0.7% 0.7% mach_kernel ml_set_interrupts_enabled 0.7% 0.7% IOACPIFamily IOACPIPlatformDevice::ioRead8(unsigned short, IOMemoryMap*) 0.4% 0.4% XUL js::mjit::ic::Equality(js::VMFrame&, js::mjit::ic::EqualityICInfo*) 0.3% 0.3% libobjc.A.dylib objc_msgSend 0.3% 0.3% GeForceGLDriver glrCompExecuteKernel 0.2% 0.2% Unknown Library 0x119317275 [unknown] 0.2% 0.2% Unknown Library 0x119317282 [unknown] 0.1% 0.1% Unknown Library 0x1193172a4 [unknown] 0.1% 0.1% Unknown Library 0x1193172a8 [unknown] 0.1% 0.1% Unknown Library 0x1193172bc [unknown] 0.1% 0.1% XUL js::GetCallVar(JSContext*, JSObject*, long, js::Value*) 0.1% 0.1% XUL nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder*, nsIFrame*, nsRect const&, nsDisplayListSet const&, unsigned int) 0.1% 0.1% Unknown Library 0x1196bb250 [unknown] 0.1% 0.1% Unknown Library 0x1193172b2 [unknown] 0.1% 0.1% GeForceGLDriver gldCopyTexSubImage 0.1% 0.1% Unknown Library 0x1196bb110 [unknown]
that profile section is < 30% of our time, though, so if we're 2x slower then there is a bunch of other stuff that's missing. wonder if it's hidden kernel/system time or something.
So my profile shows: 44% in mjit-generated code (symbol-less, so wouldn't show up in David's "heavy" output unless he did some blaming of "Unknown Library" to callers). 20% under stubs::GetElem (half self time, half typed array float stuff). This build doesn't have the in-progress patches for bug 594247, though. 7% under stubs::SetElem (again, on typed arrays). 7% under stubs::CallName (mostly self time in NameOp and js_NativeGet) 5% in tjit-generated code (again, symbol-less) 3% under ic::Equality 2% in DisabledGetElem and a long tail of GL stuff and stubs::GetProp and such, but it all adds up to just 12% given the numbers above.
Depends on: 594247
We should probably remeasure with the patches for bug 619761.
Which, btw, don't apply to TM tip, making it difficult to test. ;)
(In reply to comment #3) > We should probably remeasure with the patches for bug 619761. You mean bug 594247? Bug 619761 is this bug.
> You mean bug 594247? Er, yes.
I tried to recheck this just now. In Chrome 10, the fps meter displays "fps: 1", so I can't compare that way. The animation looks similar to me in the 2 browsers, though. Bug in Chrome?
Latest stable Chrome on Windows 7 gives me 60 fps and latest Firefox trunk give me around 28 fps. I don't see what comment 7 sees.
José, clearly there's a new bug in Chrome 10 (which is not the stable version, note).
Much of the time is in gfx, but there is a substantial amount in JS. Most of the slow calls seem to be NameOp, and they are for code like this: function top() { function f() { } function g() { f(); // lookup of f takes a slow path } }
Depends on: 624298
Just compared Nightly and Chrome 29. Both ran 100 blobs at the 48^3 resolution around 15 fps. Chrome was very stable while Firefox wasn't, but I think that's due to garbage collection.
Assignee: general → nobody
Severity: normal → S3

Link doesnt work. Calling this fixed.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.