Closed Bug 1538364 Opened 6 years ago Closed 6 years ago

Consider firing the load/loadend/final readyState events for XHR later during page load (after page load event if possible)

Categories

(Core :: DOM: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Performance Impact high
Tracking Status
firefox-esr60 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

(Keywords: perf:pageload, site-compat, Whiteboard: [necko-triaged])

Attachments

(2 files, 1 obsolete file)

Many pages use XHR during page load, and the final events for such end up firing during the load. That may affect page load time rather heavily.
https://hg.mozilla.org/try/rev/5b88b11dce7f2240bb0dba6a7ec442aa82b9c6a8 is not a well working patch, but just a quick hack to test how much XHR may affect.

Initial results with Gmail don't look too bad, and I can definitely see
the difference locally.
linux https://i.ibb.co/jVGgjs8/image.png
windows https://i.ibb.co/b6Wxh8N/image.png

GDocs and GSlides hero seem to be affected too (but we don't measure loadtime on those ??)
Doesn't seem to affect much to other tp6 sites.

Assignee: nobody → bugs
Whiteboard: [qf:p1:pageload]
Attached patch xhr_during_load_v1.diff (obsolete) — Splinter Review

We should do something similar to fetch() too, but that is still way less often used.

Blocks: 1538516
Priority: -- → P2
Whiteboard: [qf:p1:pageload] → [qf:p1:pageload][necko-triaged]
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8d17bfeca07 Fire the load/loadend/final readyState events for XHR later during page load (after page load event if possible), r=baku
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

67=wontfix because I assume that XHR changes are too risky to uplift for Firefox/GeckoView 67 Beta (and Fenix MVP).

Depends on: 1540661
Keywords: site-compat
Regressions: 1553400
Performance Impact: --- → P1
Keywords: perf:pageload
Whiteboard: [qf:p1:pageload][necko-triaged] → [necko-triaged]
Regressions: 1909969
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: