Unexpectedly high CPU usage when pausing on a JavaScript breakpoint
Reported by
lee...@gmail.com,
Sep 21
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce the problem: 1. Open the Task Manager and measure CPU usage of your tab 2. Put a breakpoint in any JavaScript file used by that tab 3. Make sure the script execution pauses on that breakpoint 4. Measure CPU usage of your tab again What is the expected behavior? What went wrong? Task Manager shows that the tab I'm trying to debug takes 6-15% CPU when idle and Developer Tools are open. When using the webpage it goes up to 30% on average, never above 50%. When it pauses on any JavaScript breakpoint CPU usage immediately jumps to 200-260%. It goes down again if I continue script execution. Did this work before? N/A Chrome version: 69.0.3497.100 Channel: stable OS Version: Ubuntu 18.04 Flash Version: JavaScript is not minified. I'm not using source maps & I have them disabled in settings. I tried disabling different extensions with no luck. My CPU is i7-7700HQ. I have an ultrabook (poor cooling) and thermald shuts my machine down when CPU temperature hits 100 degrees Celsius. It happened to me 3 times this week, each time when debugging in Chrome. Never ever before.
,
Sep 22
Please find the file attached. I noticed that when the tab is inactive, the CPU usage goes down a bit. That's why you'll find lower CPU usage at the beginning & end of the tracing results. This is 100% reproducible.
,
Sep 23
,
Sep 24
I do not see any DevTools specific in the trace. There are a lot of work happening on compositor tile workers. Do you have dedicated GPU in your ultrabook? Could you go to DevTools settings and check "Disable paused state overlay" checkbox in Appearance section of Preferences tab and try to reproduce issue again? + blink > compositing, just in case if compositor guru can detect well known issue by trace.
,
Sep 24
,
Sep 25
,
Sep 25
Yes, I have a dedicated GPU. I'm using official drivers.
Partial output of `lshw -c video`:
product: GP107M [GeForce GTX 1050 Ti Mobile]
configuration: driver=nvidia latency=0
Partial output of `modinfo nvidia`:
filename: /lib/modules/4.15.0-32-generic/updates/dkms/nvidia.ko
alias: char-major-195-*
version: 396.54
name: nvidia
vermagic: 4.15.0-32-generic SMP mod_unload
My machine is Asus ZenBook Pro UX550VE.
---------
With "Disable pause state overlay" option checked the issue does not occur.
Unless I go to the "Elements" tab and activate the "Select an element in the page to inspect it" tool. Once I select an element or deactivate the tool, CPU usage drops down again.
---------
Sorry, I cannot find "blink > compositing".
https://cdn.pbrd.co/images/HFvzQ8b.png
,
Sep 28
Agreed that the trace looks like a lot of the time is being spent in raster workers. This is likely because devtools is causing lots of repaints for some reason. That would probably be the place to start investigating.
,
Sep 29
,
Sep 29
It looks like 760738 is canvas related, I am no longer working on canvas. fserb@: could you take a look.
,
Oct 3
Fernando, please take a look. Feel free to reassign if you think that it is not gpu related.
,
Oct 9
,
Dec 4
This was a compositor issue. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by alph@chromium.org
, Sep 21