Closed Bug 1607559 Opened 4 years ago Closed 4 years ago

Slow performance of inline source maps

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox-esr68 unaffected, firefox74 wontfix, firefox75 wontfix, firefox76 wontfix, firefox77 verified)

VERIFIED FIXED
Firefox 77
Tracking Status
firefox-esr68 --- unaffected
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- verified

People

(Reporter: Harald, Assigned: loganfsmyth)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

The local dev version of hubs (https://github.com/mozilla/hubs) uses inline source maps.

Firefox takes 40+ seconds to load them. https://perfht.ml/305hcsz

Chrome is instant.

The prod build, https://hubs.mozilla.com/, does not excibit the same issue.

There are also some non-readable source map errors which might be related, see attached logs.

Logan, could you help with root cause analysis?

Flags: needinfo?(loganfsmyth)

So, it looks like the problem is we're spending a ton of time parsing the sources. I can also dig a bit more into this.

@Harald
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1607639 for the exceptions you posted, since those would be unrelated to performance issues.

Since Jason already started, Ill leave it to him to dig into the perf more.

Flags: needinfo?(loganfsmyth) → needinfo?(jlaster)
20:08.78 INFO: Last good revision: 36535c33a0c0fcfe26409f2c4fccc134f092bd07
20:08.78 INFO: First bad revision: 78a3f864177fe193bb6ee4a14b81cbe84e25435c
20:08.78 INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=36535c33a0c0fcfe26409f2c4fccc134f092bd07&tochange=78a3f864177fe193bb6ee4a14b81cbe84e25435c

Which makes it bug 1558111. Before the source map loaded in less than 5sec. Jason recommended that this low-level change might be better suited for Logan to analyze.

Flags: needinfo?(jlaster) → needinfo?(loganfsmyth)
Keywords: regression
Regressed by: 1558111
Has Regression Range: --- → yes

By loading whatwg-url like this, we replace the worker global URL property
(among others), which means that code that uses URL and expects it to be the
version that is built into Firefox may not get what they expect.

Assignee: nobody → loganfsmyth
Status: NEW → ASSIGNED
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c810f015eef6
Part 1: Do not replace the global URL with whatwg-url. r=jlast
https://hg.mozilla.org/integration/autoland/rev/d06eff418943
Part 2: Avoid perf issue with data: URLs for inlined source-maps. r=jlast
Flags: needinfo?(loganfsmyth)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
Blocks: 1628194
Flags: qe-verify+

Confirmed issue with 76.0 on macOS 10.15.3 comparing console errors up.
Fix verified with 77.0b4 on Windows 10, macOS 10.15.3, Ubuntu 20.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: