Closed Bug 1606729 Opened 6 years ago Closed 6 years ago

Reduce the number of debugger requests made when inspecting objects

Categories

(Core Graveyard :: Web Replay, enhancement)

enhancement
Not set
normal

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(1 file)

Requests made by replay debugger objects are a major source of slowdown with cloud replaying. These requests happen when the debugger is inspecting something in the replaying process, like getting an object's properties or doing an evaluation. With local replay this happens via IPC (not all that fast) and with cloud replay this happens via a network request (extremely slow). The middleman blocks while these requests are being processed, we need to minimize the number of requests that are made.

Some operations require a huge number of requests. For example, the browser_rr_object_preview-02.js mochitest basically just opens a Window object in the scopes pane, and requires nearly 2500 requests, which would take 4 minutes with a 100ms ping. The vast majority of these requests are fetching data associated with previous requests, e.g. we issue a request to fetch the window's properties, then issue separate requests to get the contents of every object in those properties, then issue requests to get some of the properties of each of those objects to show an inline preview.

A simple way to reduce the number of requests, then, is to return information like this from the replaying process even when it wasn't asked for. When we ask for the window's properties we also send all the objects and previewing information for the properties we found. The existing PreviewedObjects class makes it easy to bundle up this information and incorporate it into the middleman, and we just need to deal with some fallout where new external calls are being made due to the more aggressive gathering of property values.

The attached patch makes this change and performs some other tweaks to avoid needing to make debugger requests. This reduces the number of requests on the above test to 4 --- get the pause data, get the window contents, and a couple for fetching the document's style sheets (it would be good to fix these, but might be a little invasive right now).

With this patch, the number of debugger requests made on the web replay mochitests is small, except for the inspector tests. These still make several thousand requests and will be dealt with at another time (I'm not sure yet what the best approach there is).

Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00d776b2e49c Reduce the number of debugger requests made when inspecting objects, r=jlast.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: