Closed Bug 952767 Opened 10 years ago Closed 10 years ago

Variables view scopes should always be lazily populated

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: vporof, Assigned: vporof)

Details

Attachments

(1 file)

I've been playing with the debugger a bit on http://codemirror.net/demo/emacs.html and rapidly stepping in felt a bit slow.

Profiling this led me to conclude that it's a regression from bug 758157, where I started immediately populating function and block scopes, because the bindings were already available. The problem is that we're basically populating scopes that are collapsed, on each pause, and this consisted of approx. 30-40% of the time spent while stepping. On that particular page the second scope contains hundreds of variables that we might potentially never need to inspect, at least not while rapidly stepping. It's trivial to optimize this, so let's do it.
Status: NEW → ASSIGNED
QA Contact: vporof
This optimizes things, dries up code in VViewController a bit and removes the setIntervals in the closure inspection test.
Assignee: nobody → vporof
Attachment #8350910 - Flags: review?(past)
Comment on attachment 8350910 [details] [diff] [review]
dbg-lazy-expand.patch

Review of attachment 8350910 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js
@@ +56,2 @@
>      is(globalScope._store.size, 0,
> +      "The global scope shoild have no variables available yet.");

shoild -> should (x3)

@@ +101,5 @@
> +    let fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES);
> +    secondScope.expand();
> +    thirdScope.expand();
> +    globalScope.expand();
> +

Aren't you forgetting a "yield fetched;" here?
Attachment #8350910 - Flags: review?(past) → review+
kinda looks that way.

feelin' p3.
Priority: -- → P3
(In reply to Panos Astithas [:past] from comment #3)
> Comment on attachment 8350910 [details] [diff] [review]
> 
> @@ +101,5 @@
> > +    let fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES);
> > +    secondScope.expand();
> > +    thirdScope.expand();
> > +    globalScope.expand();
> > +
> 
> Aren't you forgetting a "yield fetched;" here?

Good catch!
https://hg.mozilla.org/mozilla-central/rev/667956d558f4
https://hg.mozilla.org/mozilla-central/rev/4399fe4ecf56
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
QA Contact: vporof
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: