Closed
Bug 858986
Opened 11 years ago
Closed 4 months ago
slow javascript performance on a typed array testcase with nested .call and so forth
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: leeoniya, Unassigned)
References
()
Details
Attachments
(1 file)
140.68 KB,
application/zip
|
Details |
Some of my image analysis functions run much more slowly in FF nightly than Chromium nightly. Unfortunately, I don't have a greatly reduced test case but I do have a demonstration of the issue. Steps to reproduce: 1. Open http://o-0.me/ff-scan-slow/ in Chromium and Firefox 2. Look in console at the elapsed times for each output. 3. The first number is total time since start, second is time since prior console output. The .scanXY() method in Chromium achieves 30ms while Firefox is at 125ms on my laptop. This is a huge difference which I cannot explain. This algorithm does a full scan of an internal typed array that results from converting imageData to grayscale. For quick source browsing, i have open sourced pXY.js at https://github.com/leeoniya/pXY.js My completely random guess is that maybe it's the overhead of doing "new" on each pixel iteration, https://github.com/leeoniya/pXY.js/blob/master/src/pXY.js#L464 but Chrome somehow optimizes this very well. thanks! Leon
You might want to put this bug in the Core product, JavaScript Engine component. Otherwise the chance is big that the JS devs miss it.
Reporter | ||
Comment 2•11 years ago
|
||
thanks, switching to Core/JavaScript Engine
Component: General → JavaScript Engine
Product: Firefox → Core
Comment 3•11 years ago
|
||
Nothing jumping out at me from the profile other than some nested .call/.apply (not inlined?) and some js::ion::DoGetElemFallback under EnterBaseline...
Updated•11 years ago
|
Summary: slow javascript performance → slow javascript performance on a typed array testcase with nested .call and so forth
Comment 4•11 years ago
|
||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #3) > Nothing jumping out at me from the profile other than some nested > .call/.apply (not inlined?) and some js::ion::DoGetElemFallback under > EnterBaseline... I'm also noticing a bunch of |splice.call(arguments)| showing up here for arguments => array conversion, which we identified as a problem before because Ion doesn't handle it.
Comment 6•11 years ago
|
||
Yeah, that probably explains why a bunch of this is running in baseline to start with...
Reporter | ||
Comment 7•11 years ago
|
||
is there a perf bug open for this? i'd be interested in progress here since i have a lot of app code likely suffering from this on a much larger scale.
Updated•11 years ago
|
Flags: needinfo?(kvijayan)
Comment 8•11 years ago
|
||
.call performance should now be better since bug 884310 and bug 884298
Comment 9•11 years ago
|
||
We do better than Firefox 21, say... I see scanXY take about 180ms for scanXY and nightly takes about 80ms. Chrome dev takes 17ms on the same hardware. A profile of current nightly is ... odd. For example, doing the scanXY call a bunch of times does NOT take noticeably more time than a single call.
Comment 10•10 years ago
|
||
I took a look at the current profile of this. The biggest thing I found (on MacOSX 64-bit) was that we're spending 25% of our time in DoGetPropFallback.
Flags: needinfo?(kvijayan)
Updated•2 years ago
|
Severity: normal → S3
Updated•4 months ago
|
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•