Closed Bug 1414286 Opened 7 years ago Closed 6 years ago

Add DAMP test for inspector markup view expand all

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Bug 1413605 improves significantly the performance of the inspector when the markup view displays a lot of elements. 

We should add a new DAMP test to avoid regressing here.
I would like to land this DAMP test before landing the shadow DOM work.
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Blocks: 1053898
Attachment #8960899 - Attachment is obsolete: true
Comment on attachment 8959359 [details]
Bug 1414286 - add DAMP test for inspector expandAll/collapseAll;

https://reviewboard.mozilla.org/r/228192/#review235398

Looks good overall but see my comments.

Linux try results are good, the only unexpected change is +14% on custom.jsdebugger.stepIn.
It would be great to get another try run to see if that is a persistent behavior.

::: testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:19
(Diff revision 4)
>  
>    let toolbox = await openToolboxAndLog("custom.inspector", "inspector");
>    await reloadInspectorAndLog("custom", toolbox);
> +
>    await selectNodeWithManyRulesAndLog(toolbox);
> +  await toolbox.target.client.waitForRequestsToSettle();

`waitForRequestsToSettle` is a stopgap method, it should not be used manually like this.
If there is async requests that you know are still pending, you should make your best to wait for them.
Does it have any effect on DAMP results?

::: testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:23
(Diff revision 4)
>    await selectNodeWithManyRulesAndLog(toolbox);
> +  await toolbox.target.client.waitForRequestsToSettle();
> +  await garbageCollect();
> +
> +  await collapseExpandAllAndLog(toolbox);
> +  await toolbox.target.client.waitForRequestsToSettle();

Same comment about waitForRequestsToSettle.

::: testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:78
(Diff revision 4)
> +  await waitForMultipleChildrenUpdates(inspector);
> +  test.done();
> +
> +  dump("Collapse all children of expand-many-children\n");
> +  test = runTest("custom.inspector.collapseall.manychildren");
> +  inspector.markup.collapseAll(many);

We are only measuring the time it takes to call this method, is that expected? Isn't there any async event to listen to?

::: testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:93
(Diff revision 4)
> +  await waitForMultipleChildrenUpdates(inspector);
> +  test.done();
> +
> +  dump("Collapse all children of expand-balanced\n");
> +  test = runTest("custom.inspector.collapseall.balanced");
> +  inspector.markup.collapseAll(balanced);

Same question here. Any async event to wait for?
Attachment #8959359 - Flags: review?(poirot.alex) → review+
Thanks for the review!

(In reply to Alexandre Poirot [:ochameau] from comment #10)
> Comment on attachment 8959359 [details]
> Bug 1414286 - add DAMP test for inspector expandAll/collapseAll;
> 
> https://reviewboard.mozilla.org/r/228192/#review235398
> 
> Looks good overall but see my comments.
> 
> Linux try results are good, the only unexpected change is +14% on
> custom.jsdebugger.stepIn.
> It would be great to get another try run to see if that is a persistent
> behavior.

jsdebugger stepIn used to oscillate between two values a few days ago, but it looks like debugger v24 made the test more stable. In the last windows run, stepin doesn't show up anymore : https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&originalRevision=7afac953cdb3308614d96c99ee8056e38a0bd8d0&newProject=try&newRevision=30927c13dfe28be8d9c1e7a8282d44d125684152&originalSignature=2fa549258445b035f7463afad97852e46b399a6d&newSignature=2fa549258445b035f7463afad97852e46b399a6d&showOnlyConfident=1&framework=1

> 
> :::
> testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:19
> (Diff revision 4)
> >  
> >    let toolbox = await openToolboxAndLog("custom.inspector", "inspector");
> >    await reloadInspectorAndLog("custom", toolbox);
> > +
> >    await selectNodeWithManyRulesAndLog(toolbox);
> > +  await toolbox.target.client.waitForRequestsToSettle();
> 
> `waitForRequestsToSettle` is a stopgap method, it should not be used
> manually like this.
> If there is async requests that you know are still pending, you should make
> your best to wait for them.
> Does it have any effect on DAMP results?
> 
> :::
> testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:23
> (Diff revision 4)
> >    await selectNodeWithManyRulesAndLog(toolbox);
> > +  await toolbox.target.client.waitForRequestsToSettle();
> > +  await garbageCollect();
> > +
> > +  await collapseExpandAllAndLog(toolbox);
> > +  await toolbox.target.client.waitForRequestsToSettle();
> 
> Same comment about waitForRequestsToSettle.
> 

looks like it doesn't make any difference for the impact on custom.inspector close, I will therefore remove it. What do you think about garbageCollect() ? It doesn't seem to change the impact on close either, so I'm tempted to get rid of it as well.

> :::
> testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:78
> (Diff revision 4)
> > +  await waitForMultipleChildrenUpdates(inspector);
> > +  test.done();
> > +
> > +  dump("Collapse all children of expand-many-children\n");
> > +  test = runTest("custom.inspector.collapseall.manychildren");
> > +  inspector.markup.collapseAll(many);
> 
> We are only measuring the time it takes to call this method, is that
> expected? Isn't there any async event to listen to?
> 
> :::
> testing/talos/talos/tests/devtools/addon/content/tests/inspector/custom.js:93
> (Diff revision 4)
> > +  await waitForMultipleChildrenUpdates(inspector);
> > +  test.done();
> > +
> > +  dump("Collapse all children of expand-balanced\n");
> > +  test = runTest("custom.inspector.collapseall.balanced");
> > +  inspector.markup.collapseAll(balanced);
> 
> Same question here. Any async event to wait for?

Collapse does not perform anything async at the moment, it simply updates the UI. I should fire an event from the markup view to make this a bit less implementation specific. I'll add a changeset to do that.
Comment on attachment 8961380 [details]
Bug 1414286 - return promise in markup view collapse/expandAll;

https://reviewboard.mozilla.org/r/230144/#review235936
Attachment #8961380 - Flags: review?(pbrosset) → review+
Thanks for the review, let's land this!
Comment on attachment 8959359 [details]
Bug 1414286 - add DAMP test for inspector expandAll/collapseAll;

https://reviewboard.mozilla.org/r/228192/#review235398

> `waitForRequestsToSettle` is a stopgap method, it should not be used manually like this.
> If there is async requests that you know are still pending, you should make your best to wait for them.
> Does it have any effect on DAMP results?

Dropped it

> We are only measuring the time it takes to call this method, is that expected? Isn't there any async event to listen to?

Made collapseAll and expandAll both return a promise now so we just wait on it in both cases.
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d7fa73a97d0
return promise in markup view collapse/expandAll;r=pbro
https://hg.mozilla.org/integration/autoland/rev/6cdea4618a5a
add DAMP test for inspector expandAll/collapseAll;r=ochameau
https://hg.mozilla.org/mozilla-central/rev/7d7fa73a97d0
https://hg.mozilla.org/mozilla-central/rev/6cdea4618a5a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: