Bug 141845 - Very slow layout when rendering nested flexbox divs
Summary: Very slow layout when rendering nested flexbox divs
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All iOS 8.1
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 12:23 PST by natewienert
Modified: 2017-04-25 13:11 PDT (History)
7 users (show)

See Also:


Attachments
Test html for slow performance (142.94 KB, text/html)
2015-02-20 12:23 PST, natewienert
no flags Details
Top functions (701.02 KB, image/png)
2015-02-20 13:56 PST, Benjamin Poulain
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description natewienert 2015-02-20 12:23:37 PST
Created attachment 246985 [details]
Test html for slow performance

I ran into this on both Desktop Safari 8.0 and mobile Safari on iOS 8.

In Chrome and Firefox the rendering is "normal" (<100ms), whereas in Safari the entire browser will lock for about 10 seconds on the attached HTML just to render.

If you add:

.comment, .comment div {
  display: 'block"
}

It immediately becomes fast again.
Comment 1 Benjamin Poulain 2015-02-20 13:56:45 PST
Created attachment 246998 [details]
Top functions
Comment 2 Benjamin Poulain 2015-02-20 14:10:07 PST
On Nightly, the test is not bad, definitely not 10 seconds delay.

From the profile, I would not be surprised if we can cut another 5% of CPU time.

Nate, I cannot reproduce this locally but I only have ToT WebKit. Can you try resizing the window to see if that is slow too?
Comment 3 natewienert 2015-02-21 12:57:55 PST
Yea looks slow on resize as well, here's a video:

http://gfycat.com/NimbleFlashyJohndory
Comment 4 Simon Fraser (smfr) 2017-04-25 13:11:38 PDT
Performance here has much improved.