Open Bug 1797246 Opened 2 years ago Updated 2 years ago

https://codepen.io/aragakey/pen/LYmXqEp takes some time to redraw on mouse click

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

go to https://codepen.io/aragakey/pen/LYmXqEp
Click to redraw/randomize the demo

ER: fast redraw
AR: Somewhat laggy redraw

Profile: https://share.firefox.dev/3ssiJIk

Chrome is also slow in this case so not sure if much time should be spent in investigation here.

The profile seems to suggest a couple of places ( mozilla::detail::VectorImpl::new_ , arena_t::RallocSmallOrLarge , BoyerMooreHorspool ) which spent a lot of time in Baseline. Maybe worthwhile to probe that a bit?

Attached image Profile_annotated.png (deleted) —

Screenshot from profiler which show the functions I have mentioned in the comment above.

The memset highlighted in the profile comes from reallocations done from String.unespace, which does a realloc in ExtractWellSized, which suggest that a lot of characters were escaped.

Maybe there is a fast path to be implemented here, for cases where escaped characters are more frequent than unescaped ones, but this sounds like a low priority for the moment.

Blocks: sm-runtime
Severity: -- → N/A
Component: JavaScript Engine: JIT → JavaScript Engine
Priority: -- → P3
No longer blocks: sm-runtime
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: