Open Bug 1965398 Opened 5 months ago Updated 10 days ago

Testcase preloading and then querying cache is 4.5x slower in Firefox compared to Chrome

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

Serve the testcase over a simple HTTP server
Open the testcase
Input 50000 and click on run

Firefox gecko profiler: https://share.firefox.dev/433pbHp (40s)
Firefox samply profiler: https://share.firefox.dev/3Sq879I (38s)
Chrome samply: https://share.firefox.dev/4iV48wK (9s)

Summary: Testcase preloading and the querying cache is 4.5x slower in Firefox compared to Chrome → Testcase preloading and then querying cache is 4.5x slower in Firefox compared to Chrome
Attached file about:support

Note that UBlock seems heavily involved; can you retake the profiles without ublock? https://share.firefox.dev/42QIXqS
Also, collect the profile with the Networking preset if you can. Thanks!

Flags: needinfo?(mayankleoboy1)

Fresh profile, no addons. Networking preset logging.
N=10k. (Profile with N=50k is too big to capture)
https://share.firefox.dev/4jTvQLJ (13s)

Flags: needinfo?(mayankleoboy1) → needinfo?(rjesup)

With this test (and another 1-2 for which i didnt file bugs), i am trying to test the performance of the cache of browsers. The idea being that people visit the same set of websites. So the perf of reading/validating existing data from the cache should be fast.

Blocks: 1980560
See Also: 1943230

FYI. The profile shows that the cache appears to be uninvolved; the issue is the CPU needed to create a channel, and the biggest culprit appears to be the Classifier.

Flags: needinfo?(rjesup)
Flags: needinfo?(edgul)
Flags: needinfo?(acreskey)
Flags: needinfo?(acreskey)
See Also: → 1933562, 1984478

To elaborate: over 70% of the CPU time seems to be taken by channel creation, and the largest single runnable of that is ~31% in the Classifier - return runnable (which kicks off the next/primary stage of channel creation). "Task AsyncUrlChannelClassifier::CheckChannel - return" in https://share.firefox.dev/46nAtt3

26% Task PNecko::Msg_PHttpChannelConstructor
13% HttpChannelParent::TryInvokeAsyncOpen
and others

Jeff points out that markers are using up a lot of CPU here too.

See Also: 1933562, 1984478
Flags: needinfo?(edgul)
Blocks: necko-perf
Severity: -- → S3
Priority: -- → P3
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: