Open Bug 1057655 Opened 10 years ago Updated 2 years ago

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: mp3geek, Unassigned)

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140821073021

Steps to reproduce:

Visit; http://programming-enchiladas.destructuring-bind.org/rm-hull/2e6bb141d9361fb1af03
Firefox performance slows down


Actual results:

Performance on site is less than optimal while its generating animation.


Expected results:

Open in Chrome, website performs without speed issues.
OS: Windows 7 → All
Hardware: x86_64 → All
Version: 29 Branch → Trunk
Status: UNCONFIRMED → NEW
Component: Untriaged → Canvas: 2D
Ever confirmed: true
Keywords: perf
Product: Firefox → Core
(In reply to Ting-Yu Chou [:ting] from comment #1)
> Profile: http://people.mozilla.org/~bgirard/cleopatra/#report=f9783c83c01ccc373d038057035c6e5291c26443

The samples are mostly in generated.js.
Move this to javascript based on the profile.
Component: Canvas: 2D → JavaScript Engine
Are you sure this is an opt build? Some of the things in the profile should absolutely have been inlined. jsfun.h#317 in particular is an assert that shouldn't exist at all in an opt build. If it's a debug build, then the profile doesn't give us much information, really.
Flags: needinfo?(tchou)
Grab another profile from opt build, the animation type is "Semi-vote": http://people.mozilla.org/~bgirard/cleopatra/#report=26eedd1034a6d56d1d085e4c0c5c7b0546e9e88b

But I'd like to know why a profile from debug build doesn't help much, could you please tell me? Thanks.
Flags: needinfo?(tchou)
(In reply to Ting-Yu Chou [:ting] from comment #5)
> But I'd like to know why a profile from debug build doesn't help much, could
> you please tell me? Thanks.

The problem is that debug builds have completely different performance characteristics compared to opt builds. They do a lot of explicit additional work in the form of asserts, for example. That additional work isn't evenly distributed, so something that might take 20% of all time in a debug build might well only take 2% in an opt build.

Inlining is another source of substantial differences. If a lot of time is spent in a nest of lots of small functions in a debug build, it might well be that almost all of those are inlined and executing the code contained in them become much faster in opt builds.

And finally, the compiler just optimizes a lot more for opt builds, removing redundant logic, hoisting property reads out of loops and similar things.
I see, thanks for explaining me.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.