Open Bug 1797246 Opened 1 year ago Updated 10 months ago takes some time to redraw on mouse click


(Core :: JavaScript Engine, enhancement, P3)





(Reporter: mayankleoboy1, Unassigned)


(Blocks 1 open bug)



(1 file)

go to
Click to redraw/randomize the demo

ER: fast redraw
AR: Somewhat laggy redraw


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

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.