Closed Bug 1362401 Opened 9 years ago Closed 9 years ago

PdfJs.init causes startup jank

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1389443
Performance Impact medium

People

(Reporter: florian, Assigned: bytesized)

References

(Blocks 1 open bug)

Details

The PdfJs.init call at http://searchfox.org/mozilla-central/rev/6580dd9a4eb0224773897388dba2ddf5ed7f4216/browser/components/nsBrowserGlue.js#882 just after the first window is loaded causes jank, due to getFromTypeAndExtension (http://searchfox.org/mozilla-central/rev/6580dd9a4eb0224773897388dba2ddf5ed7f4216/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm#302) causing nsHandlerService to initialize, which reads mimeTypes.rdf. Bug 1287658 just changed this to a json file which should be smaller, but it's still main thread IO. We should find a way to do this asynchronously, and/or during idle time, rather than immediately after the first window is shown during startup. This is 149ms of near-startup jank on this profile captured on the quantum reference device: https://perfht.ml/2pNR0kd
Flags: qe-verify?
Priority: -- → P2
Blocks: 1363425
Whiteboard: [photon-performance][qf] → [photon-performance][qf:p1]
Flags: qe-verify? → qe-verify+
QA Contact: adrian.florinescu
Priority: P2 → P3
Whiteboard: [photon-performance][qf:p1] → [reserve-photon-performance][qf:p1]
Whiteboard: [reserve-photon-performance][qf:p1] → [reserve-photon-performance][qf:p2]
See Also: → 1371340
I was going to take a look at this one, but I am having a hard time reproducing it. Was this on a cold startup?
Assignee: nobody → ksteuber
Flags: needinfo?(florian)
I believe we fixed this in bug 1389443.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(florian)
Resolution: --- → DUPLICATE
Flags: qe-verify+
Priority: P3 → --
QA Contact: adrian.florinescu
Whiteboard: [reserve-photon-performance][qf:p2] → [qf:p2]
Performance Impact: --- → P2
Whiteboard: [qf:p2]
You need to log in before you can comment on or make changes to this bug.