Closed Bug 1752764 Opened 3 years ago Closed 1 year ago

shop.nestle.jp shows slower than Chrome

Categories

(Core :: Networking: HTTP, defect, P3)

Desktop
Windows 10
defect

Tracking

()

RESOLVED WONTFIX
Performance Impact low
Tracking Status
firefox98 --- affected

People

(Reporter: alice0775, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: nightly-community, perf:pageload, Whiteboard: [necko-triaged])

Steps to reproduce:

  1. Open https://shop.nestle.jp/

Actual Results:
It will take about 5 seconds for the first page to appear.
Profiler log: https://share.firefox.dev/3ISImrE
And the network monitor shows a lot of NS_BINDING_ABORTED errors.

Expected Results:
It takes about 3 sec in Chrome.

Not really sure what is going on here, but the busted network connections are definitely weird. It looks like for some reason we abort the initial load and then load a second time from https://shop.nestle.jp/ssosid_router.php?destination=%2F or something, which apparently is an oracle thing (though cloudflare is also involved). Moving to networking component for investigation (not sure why this was in Fx::Preferences).

Component: Preferences → Networking: HTTP
Product: Firefox → Core
Keywords: perf
Summary: Web page showing is slower than Chrome → shop.nestle.jp shows slower than Chrome
Whiteboard: [qf]

I'm seeing a lot of OCSP requests in the profile.
Could you check if setting security.OCSP.require to false improves the performance somewhat?
Thanks!

Flags: needinfo?(alice0775)

(In reply to Valentin Gosu [:valentin] (he/him) from comment #2)

I'm seeing a lot of OCSP requests in the profile.
Could you check if setting security.OCSP.require to false improves the performance somewhat?
Thanks!

security.OCSP.require is false in default in Nightly98 as well as Firefox96.
You mean set security.OCSP.enabled to 0? Even so, the results seem almost the same.

Flags: needinfo?(alice0775)

I think that this is not a severe problem. :-)

Blocks: necko-perf
Severity: -- → S4
Priority: -- → P3
Whiteboard: [qf] → [qf][necko-triaged]

Note that NS_BINDING_ABORTED usually means that http requests are cancelled for some reason.
Maybe a http log can help us debug this issue, but the log is not able to tell us why a request is cancelled.

Performance Impact: --- → P3

Interestingly, the page stays totally blank for about 8 seconds. Then it reveals itself from a load event.
I'm not sure which network request triggers this load event. We fire the event from a DeprioritizedLoadRunner: https://share.firefox.dev/33qg7Sm

Actually, it's not the load event which triggers the reveal - the reveal happens a little earlier, it just took a little time to get to the compositor, which was confusing me.

The reveal is done by a timeout handler from a Google Tag Manager script.

  • At 6.86s, we execute "<script> inline at line 100 of https://shop.nestle.jp/", which starts the network request for https://www.googletagmanager.com/gtm.js?id=GTM-T3888T .
  • At 8.27s, the network request completes and we start off-thread compiling the script.
  • At 8.42s, the off-thread compile is done.
  • At 8.89s, we execute the script. It calls setTimeout(..., 0). This timeout is deferred.
  • At 10.83s, the timeout fires. GTM changes a class name somewhere.
  • At 11.05s, the refresh tick to process that class name change fires, and we then paint.
  • At 11.60s, we composite the result of that paint.

I'm not sure why we only execute the "<script> inline at line 100" so late. Maybe its execution waits for other <script>s to be loaded first.

What is the parent process doing around 11.35 - 11.70?
...aha, it thinks there is idle time (and there is) and calls LoadFontInfo. That seems to take lots of time, way longer than maximum idle period.
Parent process is possibly blocking anything else to happen around that time.

Thank you for tracking that down Markus. I think I know what's going on here.
This seems to be caused by the network.http.tailing.enabled pref. It's supposed to tail (de-prioritize) requests such as trackers. I assume googletagmanager is such a domain, so we end up tailing that request. Unfortunately the page is designed in such a way that it's waiting for that tracking request. I haven't dug into it much further than this. Hopefully this is an isolated web-page pattern.

Oh, there is also some accessibility stuff running in the parent process. And that looks surprisingly slow.
I guess I'll file a separate bug about that.

(This has Performance: P* set, so removing [qf])

Whiteboard: [qf][necko-triaged] → [necko-triaged]
See Also: → 1748755
Depends on: 1737192
See Also: 1748755

Ug, sorry for the spam. Wrong bug.

No longer depends on: 1737192

Given comment 9, this is an unfortunate case where a page interacts poorly with the system we have in place to make most pages faster by deprioritizing trackers. Some pages like this could end up slower.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.