Closed Bug 1814652 Opened 2 years ago Closed 2 years ago

Rename SourceMapLoader#applySourceMap and change its signature so it can take an array of ids

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

When pretty printing, we set the underlying source map to source actors in 2 folds https://searchfox.org/mozilla-central/rev/11cf68787bd00edfa7ac6a0ecd07794698cdebdc/devtools/client/debugger/src/actions/sources/prettyPrint.js#62-68

await sourceMapLoader.applySourceMap(generatedSource.id, url, code, mappings);

// The source map URL service used by other devtools listens to changes to
// sources based on their actor IDs, so apply the mapping there too.
for (const { actor } of actors) {
  await sourceMapLoader.applySourceMap(actor, url, code, mappings);
}

this means that we create multiple SourceMapConsumer when we only need one.
Let's make the function take an array of ids

Let's make it take an array of ids so we don't need
to create multiple SourceMapConsumer.

Depends on D168384

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6fdfdb4eb53 [devtools] Rename SourceMapLoader#applySourceMap and change its signature. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Improvement spotted on all platforms for pretty print tests:

== Change summary for alert #36997 (as of Wed, 08 Feb 2023 17:52:29 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
8% damp console.log-in-loop-content-process-infinity macosx1015-64-shippable-qr e10s fission stylo webrender-sw 35.29 -> 38.16
8% damp console.log-in-loop-content-process-nan macosx1015-64-shippable-qr e10s fission stylo webrender-sw 36.26 -> 39.17
6% damp console.log-in-loop-content-process-null macosx1015-64-shippable-qr e10s fission stylo webrender-sw 35.18 -> 37.44

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
39% damp custom.jsdebugger.pretty-print.DAMP macosx1015-64-shippable-qr e10s fission stylo webrender-sw 541.15 -> 331.54
39% damp custom.jsdebugger.pretty-print.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 599.61 -> 368.06
38% damp custom.jsdebugger.pretty-print.DAMP windows10-64-shippable-qr e10s fission stylo webrender 599.78 -> 369.47
38% damp custom.jsdebugger.pretty-print.DAMP macosx1015-64-shippable-qr e10s fission stylo webrender 535.52 -> 333.53
32% damp custom.jsdebugger.pretty-print.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 530.15 -> 362.03
31% damp custom.jsdebugger.pretty-print.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 513.78 -> 355.51

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=36997

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: