Hang (slow reflow) with extremely linewrapped block with ::first-letter styling
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
Details
Attachments
(2 files)
[Spinning this off from bug 997280, whose testcase used to crash and now hangs for a few seconds instead]
STR:
- Load attached testcase (simplified from the one on bug 997280).
- Wait for text to appear.
ACTUAL RESULTS:
Hang for a few seconds. (The actual duration is logged via console.log().)
EXPECTED RESULTS:
No hang.
This seems to be dependent on the first letter having ::first-letter styling, and the text being extremely linewrapped. If I remove the ::first-letter rule, or if I change the specified width to be a larger value like 300px, then the issue goes away.
| Reporter | ||
Comment 1•3 years ago
|
||
Profile of the long reflow with the attached testcase: https://share.firefox.dev/3VkPlkd
The reflow is ~2.7 seconds long (and console.log shows Duration: 2714ms).
Most of the time (2.699 seconds) is spent in nsFirstLetterFrame::Reflow, specifically its call to nsTextFrame::EnsureTextRun and its various calls into BuildTextRunsScanner APIs.
| Reporter | ||
Comment 2•3 years ago
|
||
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 3•3 years ago
|
||
In Chrome, console.log() reports 8-9 ms for the original testcase (vs. our ~2700ms).
For the "semi-reference case" that I just attached, we get times between 7-9ms as well.
Description
•