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

Issue 732223 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Devtools Performance Bottom-Up drawer loading slow

Reported by vesak...@gmail.com, Jun 12 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. Record something with Performance
2. Click Bottom-Up tab
3. 

What is the expected behavior?
Bottom-Up tab and it's contents are shown

What went wrong?
It takes ~90 seconds to change to Bottom-Up tab in which time devtools are unresponsive. CPU takes > 100% resources.

Did this work before? N/A 

Chrome version: 58.0.3029.110  Channel: n/a
OS Version: OS X 10.12.5
Flash Version: 

I haven't been using Performance before, so I'm not sure if this is supposed to be faster
 

Comment 1 by vesak...@gmail.com, Jun 12 2017

What went wrong?: "CPU takes > 100% resources" -> "Google Chrome Helper takes > 100% CPU"
Labels: Needs-Feedback
Could you send us a trace of DevTools when this happens? To open DevTools on DevTools: 1) Undock DevTools 2) Use the DevTools shortcut (for Mac: Command + Shift + I) and then record a trace in the Performance panel.

If you could share more details such as a screencast and whether this happens on one particular site, that would be great. Thanks.

Comment 3 by vesak...@gmail.com, Jun 13 2017

Sorry, I can't provide trace or screenshots due to NDA. What I can say that the site is heavy with react and flux, and, is that I can't reproduce this bug with any smaller sites. Can you point me to a public site that perhaps you are using when testing performance, so that I can try to reproduce bug there?
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 13 2017

Cc: chenwilliam@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "chenwilliam@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 woxxom@gmail.com, Jun 13 2017

Repro steps:
1. open http://kangax.github.io/compat-table/es6/
2. open devtools (Ctrl-Shift-I or F12 key)
3. switch to Performance panel in devtools
4. make sure Summary sub-panel is active
5. click the second toolbar button that looks like a reload icon ↺
6. wait for the profiling to complete (about 10 seconds)
7. switch to Bottom-Up sub-panel

EXPECTED: the sub-panel is switched instantaneously
OBSERVED: 1 second pause, then the sub-panel is switched

Depending on complexity of the code being profiled and the computer CPU speed, the delay may increase to several seconds or more.

----------------------------

Debugging the devtools code in devtools-for-devtools shows a very complicated flame-chart (screenshot attached) for _buildHeaviestStack() in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js

I'm 100% sure chromium developers know the standard solution for such cases is to switch immediately and display the results dynamically by inserting them in correct sorting order every 100ms, for example:

  panelSwitched = false
  TIME_THRESHOLD_MS = 100
  TIME0 = performance.now()
  for item in items:
    stats[item.key] = calculateStatistics(item)
    displayQueue.add(item)
    if performance.now() - TIME0 > TIME_THRESHOLD_MS:
      if not panelSwitched:
        panelSwitched = true
        switchSubPanelImmediately()
      for queueItem in displayQueue:
        element = findPrecedingPositionInDisplayedList(queueItem)
        queueItem.insertAfter(element)
      TIME0 = performance.now()

Clip275-fs8.png
31.2 KB View Download
Components: -Platform>DevTools Platform>DevTools>Performance
Owner: alph@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: Devtools Performance Bottom-Up drawer loading slow (was: Devtools Performance Bottom-Ip tab loading slow)
@alph - can you take a look? 

Comment 7 by alph@chromium.org, Oct 21 2017

Status: Fixed (was: Assigned)
Has been fixed a while ago. Takes ~140ms as of now.

Sign in to add a comment