New issue
Advanced search Search tips

Issue 710523 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Dialog showModal() causes unnecessary full-document layout

Reported by a...@scirra.com, Apr 11 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3068.1 Safari/537.36

Steps to reproduce the problem:
1. Visit https://editor.construct.net
2. Open dev tools Performance tab, start recording
3. Click Menu -> About, and close the dialog
4. Repeat step 3 a few times
5. End the profile and inspect results

What is the expected behavior?
Reasonable layout performance.

What went wrong?
On a high-end desktop development machine, the showModal() call results in a ~22ms layout. On a low-end machine this could easily be a fraction of a second.

The main problem is that showing a dialog that floats on top of the existing document should not cause a full layout of the entire document again - it doesn't affect it.

Secondly, 22ms is a pretty slow layout time even for the full document, since there doesn't seem to be that much going on.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3068.1  Channel: canary
OS Version: 10.0
Flash Version:
 
Labels: Needs-Triage-M59

Comment 2 by ajha@chromium.org, Apr 12 2017

Cc: ajha@chromium.org
Labels: Needs-Feedback
Tested this on Windows-10, chrome version: 59.0.3068.1 and attached is the screenshot of the observation.

@reporter: Could you please help with the exact metrice to look for the layout performance.

Thanks in advance!
710523.png
176 KB View Download

Comment 3 by a...@scirra.com, Apr 12 2017

Look for the showModal call near the start of an animation. It looks like this: https://dl.dropboxusercontent.com/u/15217362/chrome-showmodal-layouttime.png
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 12 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "ajha@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by e...@chromium.org, Apr 18 2017

Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Status: Available (was: Unconfirmed)
We might want to use contains: strict on showModal.

Comment 6 Deleted

Labels: -Needs-Triage-M59
Removing Needs-Triage-M59 label as per comment #5

Thanks.

Comment 8 by a...@scirra.com, Jul 6 2017

contain: strict on the <dialog> would force dialogs to have to have an explicit size, since strict containment does layout as if the element was empty. Surely contain: content would be more appropriate?
Project Member

Comment 9 by sheriffbot@chromium.org, Jul 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment