Closed Bug 910204 Opened 11 years ago Closed 7 years ago

Prefetch sourcemaps on the server

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

At present, the script debugger begins fetching source maps when we first would need them. This essentially guarantees that the latency of the fetch will be visible to the user, since it's begun in response to some action they've taken.

Instead, the debugger should begin fetching source maps and original sources as soon as it knows they are available. That way, if the user spends a few seconds staring at the screen to orient themselves, we might sometimes have the source maps and original sources already loaded by the time they're needed, reducing the apparent latency.

(Naturally, we should ensure the fetches are scheduled in some reasonable way, so we don't start 40 requests simultaneously; but perhaps the platform takes care of this for us already.)
Priority: -- → P3
Assignee: nobody → nfitzgerald
For new scripts (discovered via the |onNewScript| hook) we *are* grabbing the source map immediately.

For existing scripts, we won't get the source maps until the client performs a "scripts" request and we call |_discoverSources|.

We could call |_discoverSources| in |onAttach| *after* we send the packet, perhaps.

Either way, I'm not actively working on this.
Assignee: nfitzgerald → nobody
Summary: JS debugger: server should begin fetching sourcemaps immediately → Prefetch sourcemaps on the server
I think with the switch to client-side source maps, we don't want to do this any more.

The debugger might still need to wait for all the source maps, but there's not really a
way to prefetch.

On the other hand the console (and other users of the client-side service) would prefer to
lazily load, because that way the user will see relevant results more quickly (prefetching
might mean that we load unused source maps before loading the ones currently needed by the
client).

So, I'm marking this as wontfix.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.