Firefox cache significantly slower than Chrome
Categories
(Core :: Networking: Cache, defect, P2)
Tracking
()
People
(Reporter: bas.schouten, Unassigned)
Details
(Whiteboard: [necko-triaged][necko-priotity-review])
When loading hotel pages on Expedia, I noticed Firefox takes significantly more time to retrieve resources from the cache than Chrome does.
Firefox Nightly takes about 200-300ms on my machine to get most of the resources. Interestingly a local build of Firefox takes less (~150ms) and is more main thread bound.
Chrome's data is more interesting. When loading from the disk cache (i.e. when navigating away from Expedia and going back to a hotel page), it takes about 50-100ms. When navigating within a domain, it gets its stuff from the memory cache and it takes less than 10 ms.
Another interesting factor here that affects this is that Firefox pretty indiscriminately spews out a very large number of request on pageload, their, mainthread intensive, initialization workloads all get scheduled on the main thread, and block the first of the requests actually returning. This means that the speed at which, for example the first script on a page, is returned, actually depends on the total number of resources found on the page initially.
Reporter | ||
Comment 1•12 days ago
|
||
This is a profile from a nightly build, RCWN is disabled since it's kind of meaningless in this case:
https://share.firefox.dev/3Y61A6F
Here's an ETW profile from a Nightly build, this shows high overhead on the Cache2 thread from some CreateFile code:
https://share.firefox.dev/409oU6e
Here's an ETW profile from a local build, this particular overhead seems to not be present, things are faster and most of the work is on the main thread:
https://share.firefox.dev/3BXcYdn
And here's a Firefox profile of a local build where the Cache2 I/O thread is being profiled:
Comment 2•10 days ago
|
||
Thanks Bas.
Randell, how should we take take this forward?
Comment 3•9 days ago
|
||
I'm making this part of the general cache investigation underway. It's not just the cache, it appears to be contention and CPU use on MainThread as well
Description
•