Closed Bug 1209784 Opened 8 years ago Closed 4 years ago

High CPU usage just opening and browsing in debugger


(DevTools :: Debugger, defect)

44 Branch
Not set


(Not tracked)



(Reporter: porjo38, Unassigned)



(2 files)

465.25 KB, application/x-gzip
979.22 KB, application/json
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20150922120613

Steps to reproduce:

Opened debugger on a page 

Actual results:

CPU is at the usual 0 or 1 percent, but when debugger is opened, just looking around and not stepping, takes at least 40% constantly (as shown against firefox process when running top)

The same thing happens with a completely fresh profile (i.e. no extensions)

Expected results:

It shouldn't use half a cpu for no reason when the debugger is open.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Untriaged → Developer Tools: Debugger
I just want to add I see this as well (although it's more around a constant 10/15% on my computer), even when I do nothing at all.
I don't have a good STR; I see this often after I left the devtools panel opened for a long time.
But maybe it's a different bug also, as it's not completely the same as the initial description.
Last this happened it was related to spinner issue in the Debugger.  :past, has this regressed in any way?
Flags: needinfo?(past)
I'm not able to reproduce. A profile would be really useful here.
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #3)
> I'm not able to reproduce. A profile would be really useful here.

After talking on IRC, :fitzgen was not testing on Linux.  I think this may be Linux specific, as it was the last time around in bug 1003664.
Is there an easy way to profile a running Firefox instance? If you have pointers it would be marvelous :)
(In reply to Julien Wajsberg [:julienw] (away Oct 1st, 2nd) from comment #5)
> Is there an easy way to profile a running Firefox instance? If you have
> pointers it would be marvelous :)

You should be able to use the Browser Toolbox's Performance tab to record a profile while using the page debugger back in normal Firefox.
Or gprof on linux.

Or the gecko profiler addon, so that we can see C++ frames which the browser toolbox can't symbolicate right now.
I've attempted to capture profile using builtin Performance recording tool, however my browser crashes every time I stop the recording. I created Bug 1210339 for that issue.
I don't see this on Ubuntu running 41 or nightly. Can anyone reproduce this with the following page?
Flags: needinfo?(past) → needinfo?(porjo38)
Flags: needinfo?(porjo38)
This has continued to be an issue for me from 41 through to current 44. I use developer tools every day, so am keenly aware of this, and very much looking forward to a fix.
Version: 41 Branch → 44 Branch
Attached file profile.json.gz
Performance profile generated using web developer tool's 'Performance' tab. No other activity was being performed on the host at the time.
Attached file profile-by-fawad.json
I am using:

macOS 10.12.4
Firefox 54 Dev Edition

and still facing this issue. CPU usage not only increases for debugger but also when using Performance tab.
I noticed when using dev tools, browser's GC runs after every few milliseconds which is causing high CPU usage.

Check the attached profiling performed on page
Product: Firefox → DevTools

We've going to close this since the new Debugger is a pretty large departure from what we had before. If you're still able to reproduce these issues, feel free to reopen with and ideally attach a performance profile using the Gecko Performance addon.

Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.