New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 682915 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 570165
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Resizing usatoday.com recomputes the entire page style and layout because of media queries

Project Member Reported by esprehn@chromium.org, Jan 20 2017

Issue description

Chrome Version       : 57.0.2986.0

What steps will reproduce the problem?
1. Load http://www.usatoday.com/
2. Resize the window

Attached is a trace taken by vmiura@.

It shows an 8ms updateActiveStyles() call (most time is spend in RuleSet::addRulesFromSheet) followed by a ~2700 element recalc style which is the result of toggling on and off matching media queries. Afterward we have a giant ~5600 element layout.

Can we make this recalcStyle and updateActiveStyles faster? Are we doing over invalidation of style here? If we can make the recalcStyle fast then we can pass off the slow layout costs to Layout team and see if LayoutNG or targeted fixes can improve the speed there.

(Note this is a continuation of  issue 570166  where raster was addressed by turning on Ganesh.)
 
trace_usatoday_mbpro.json.gz
1.7 MB Download
Labels: -OS-Chrome OS-All
I'm also seeing really slow layout on cnn.com desktop site running on nexus 5. Not sure if it's the same thing. Loading the page for the first time is really slow (10s of seconds) and so is tap to zoom. However, pinch to zoom seems to work well, probably because the main thread is not involved in that case. Trace attached.
trace_cnn_slow_tap_to_zoom.json.gz
1.0 MB Download

Comment 3 by suzyh@chromium.org, Jan 24 2017

Labels: -Pri-3 Pri-2
Status: Available (was: Unconfirmed)
Ignore my previous comment. I was running a debug build. <shame cube>
Labels: Update-Quarterly
Is this related to  bug 570165 ?
Yeah I think these are probably the same bug.

Comment 8 by suzyh@chromium.org, Apr 10 2017

Mergedinto: 570165
Status: Duplicate (was: Available)
Marking as duplicate as per comment #7.

Sign in to add a comment