Bug 227938 - Loading cache assets very slow
Summary: Loading cache assets very slow
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-07-13 19:35 PDT by Thibaut Tiberghien
Modified: 2021-07-20 19:36 PDT (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Thibaut Tiberghien 2021-07-13 19:35:58 PDT
Steps to reproduce:

Visit https://smplr.me/BLZQAAx. On first load, the 3D assets take a few seconds to load which is normal. The bouncing spheres represent the loading state. Then refresh, the assets are cached and should load much faster.

Actual results:

The cached assets (I’ve confirmed they are cached from the network tab in the devtools, after a reload) are slow to load. The bouncing sphere are displayed for a few seconds (sometimes over 10s) even after they are displayed as loaded (cached in this instance) in the network tab.

To make things more complicated, this happens only with Safari and Firefox Developer Edition, but not with Firefox, Chrome, Chrome Dev, Edge, or Edge Dev. The experience is consistent with all browsers.

Expected results:

I'm expecting the cached assets to load quickly as with other browsers. I’ve tried to record a profile with Firefox Dev Edition (not familiar with Safari's profiler) during the load but I’m not seeing anything that explains why everything is loading for so long, see my recorded profile at https://share.firefox.dev/2TUz1fs if that helps.

I reported this on the FF side as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1720259
Comment 1 Alexey Proskuryakov 2021-07-13 23:31:32 PDT
I can reproduce it being considerable (roughly 2x) slower to complete reloading than in Chrome.

There is a lot of redirecting through accounts.google.com happening, which makes me wonder if there is something that prevents us from short circuiting it on reload. Does the same performance discrepancy remain if you put this on a site that doesn't requite authentication?
Comment 2 Thibaut Tiberghien 2021-07-14 01:10:00 PDT
Just to clarify, the redirection through accounts.google.com is for the source maps only (source maps are stored on a bucket with private access). Nothing else requires authentication on this page, the assets in question are stored on a public bucket.
Comment 3 Radar WebKit Bug Importer 2021-07-20 19:36:16 PDT