| Summary: | Very slow layout of flexbox containing overflow-wrap or word-break | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Dmitry Chestnykh <dmitry> | ||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, dmitry, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari 16 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | macOS 13 | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=249951 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Dmitry Chestnykh
2022-12-27 06:55:02 PST
Created attachment 464226 [details]
Instruments screenshot
Thanks for the detailed bug report! I bet we spend most of the time in the min preferred width computation (where the horizontal constraint is 0px). -which means this is not specific to flex, but all shrink-to-fit type of layouts. (In reply to zalan from comment #2) > Thanks for the detailed bug report! I bet we spend most of the time in the > min preferred width computation (where the horizontal constraint is 0px). > -which means this is not specific to flex, but all shrink-to-fit type of > layouts. Ah, indeed, I forgot that it also happened with display: grid when I tried to reduce the test case. (In reply to Dmitry Chestnykh from comment #4) > (In reply to zalan from comment #2) > > Thanks for the detailed bug report! I bet we spend most of the time in the > > min preferred width computation (where the horizontal constraint is 0px). > > -which means this is not specific to flex, but all shrink-to-fit type of > > layouts. > > Ah, indeed, I forgot that it also happened with display: grid when I tried > to reduce the test case. cool, thanks! will look into this. ah, this is a inline box (<span>) inside the block container case. We must be missing some cache hits here and keep re-measuring the text :|. When the text content's direct parent is the block container, the page loads fairly quickly. Should be relatively easy to address this. Created attachment 464255 [details]
Patch
(In reply to zalan from comment #6) > ah, this is a inline box (<span>) inside the block container case. > We must be missing some cache hits here and keep re-measuring the text :|. > When the text content's direct parent is the block container, the page > loads fairly quickly. True, my current workaround is to use <div> instead of <span> for that content :) > Should be relatively easy to address this. Thank you! Committed 258369@main (c17a7e439258): <https://commits.webkit.org/258369@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464255 [details]. |