Open Bug 1916213 Opened 2 years ago Updated 1 year ago

Codepen demo (https://codepen.io/cantelope/pen/qBzJEbB0 is 11x faster to initialize in Chrome compared to Nightly

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug, )

Details

Go to https://codepen.io/cantelope/pen/qBzJEbB
Wait for the animation to begin

AR: Nightly takes longer than Chrome to start the animation
ER: Better

Nightly: https://share.firefox.dev/3XocoOd (3.4s)
Chrome: https://share.firefox.dev/4e7AAtH (300ms) - Focus only on the highlighted part of the profile. The rest is of the demo actually running

Main two things in this profile:

  • Time spent growing dense elements. Jon's allocator changes may help here.
  • Time in a self-hosted next function. Looking at the JS code, I think that's the iterator protocol for operations like this shape = [...shape, a].

That's an inefficient way to append an item to an array...

We could add an optimization for spreading packed arrays, similar to what we do with OptimizeSpreadCall and OptimizeGetIterator.

Severity: -- → N/A
Priority: -- → P3

Latest profile: https://share.firefox.dev/3C9gdin
Total time has not improved, but the taskcontroller threads look somewhat different

You need to log in before you can comment on or make changes to this bug.