Open Bug 1784599 Opened 2 years ago Updated 2 years ago

In a specific scenario in a Codepen demo, lots of time appears to be spent in JS internals

Categories

(Core :: JavaScript Engine: JIT, enhancement, P4)

enhancement

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug, )

Details

  1. Go to https://codepen.io/sweaver2112/pen/RwomyVL
    Let it do its thing. Enjoy the output.
  2. Drag the "Empty space" slider all the way to the left

AR: The page will start executing, but will take a lot of time and a message "this page is slowing your browser" may pop-up
ER: Faster, if possible.

Profile: https://share.firefox.dev/3QHlmQt
The profile appears to suggests that lots of time is spent in JS internals (property lookup etc.)

In all other scenarios (by fiddling with different sliders), the profile seems to suggest that lots of time is spent executing the code, which may be hard to improve.

Almost all of the time is under WindowNamedPropertiesHandler. A DOM element with id="foo" is exposed to JS as foo; this is implemented using a proxy on the proto chain of the global object so this is all pretty slow and non-trivial to optimize.

Severity: -- → S4
Priority: -- → P4
You need to log in before you can comment on or make changes to this bug.