Closed
Bug 1220106
Opened 10 years ago
Closed 9 years ago
Slow regexp execution slows down the entire browser
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: bbouvier, Unassigned)
Details
Attachments
(1 file)
|
95.32 KB,
application/javascript
|
Details |
Here is a pure JS test case adapted from a real world website. The website is a pastebin like that tries to highlight the text by automatically detecting which language is used.
The slow pop up appears in Firefox, and the slow warning in Chromium, so that might be irregexp being just terribly slow. I haven't tried on other browsers, although I'd like to see the results in Safari.
Hannes, is there something we can do here?
| Reporter | ||
Comment 1•10 years ago
|
||
Breaking in gdb shows that we're mainly spending time in the irregexp::InterpretCode function. Linux perf CLI tool says 45% of time is spent in js::irregexp::InterpretCode<unsigned char>, 20% of time in Load32Aligned(unsigned char const*).
Comment 2•10 years ago
|
||
We should figure out why we're running in the interpreter instead of JIT..
Updated•10 years ago
|
Flags: needinfo?(hv1989)
Could it be because of bug 1219337 ?
Comment 4•9 years ago
|
||
There is not much we can do here. We hit the "RegExpStack" limit and as a result fall back to the interpreter. This is an issue in irregexp which would probably need a full rewrite of the regexp engine. I'll close this, since there is not much we can do here. This regexp is expected to be slow.
Flags: needinfo?(hv1989)
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•