Bug 141845

Summary: Very slow layout when rendering nested flexbox divs
Product: WebKit Reporter: natewienert
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: benjamin, cdumez, hyatt, kling, mike.sherov, simon.fraser, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: iOS 8.1   
Attachments:
Description Flags
Test html for slow performance
none
Top functions none

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.