Closed Bug 1653064 Opened 4 years ago Closed 4 years ago

[OS.File] Hangs while loading news.google.com, with with multi-second jank bars showing up for osfile_shared_front.jsm

Categories

(Toolkit Graveyard :: OS.File, defect)

defect

Tracking

(Performance Impact:?)

RESOLVED WORKSFORME
Performance Impact ?

People

(Reporter: dholbert, Unassigned, NeedInfo)

References

Details

Spinning this off from https://bugzilla.mozilla.org/show_bug.cgi?id=1524056#c20 -- a user @anilnnair (CC'd) is reporting:

news.google.com hangs Firefox. The status bar says transferring data from www.gstatic.com but it is not an issue with www.gstatic.com. After a very long while it gets past that point then waits at stats.g.doubleclick.net

They've created a profile:
https://share.firefox.dev/2WitRYq

...which shows a 37-second "time to first interactive" bar (yikes), much of which is associated with some long network loads -- but also, during that time period, there are some event-processing-delay red bars in Parent Process DOMWorker threads, which seem to be associated with file writing (in resource://gre/modules/osfile/osfile_shared_front.jsm). Here's the first one:
https://share.firefox.dev/2Oukb8Q

I'm not 100% sure those are responsible for the hang, but it seems likely that they're associated somehow.

See Also: → 1524056

anilnnair, would you mind testing the same site in another browser and see if you observe similar load issues there?

Specific time measurements would be great -- e.g. if your browser/system is relatively "quite" (not a lot of background activity) open a new tab, and type news.google.com, and hit "Enter"; and start a stopwatch when you hit "Enter", and measure how long it takes before the tab's icon stops animating (indicating that the page has loaded).

(For me personally: in both Firefox and Chrome, it's ~3 seconds between hitting enter and the page being loaded. I can tell from your shared profile that it's much longer for you, in Firefox; but I'm curious how much longer it is as compared to other browsers -- that would help identify possible root causes.)

Flags: needinfo?(anilnnair)
Whiteboard: [qf]

Chrome is loading all these sites pretty zippy. This is just an issue with Firefox. I have started seeing this problem on other sites besides news.google.com. In a couple of cases, it does seem to be waiting on CDN sites. Not sure if that is a clue or if it is a distraction and it is just because a lot of sites use CDN. Also, noticed that Firefox does not quit all processed when it quits. So when I restart, it has to kill the other processes running. Think that is related.

Here is an instance of just loading www.google.com. I started the recording while the site was waiting to complete the loading.

https://share.firefox.dev/3fyO04a

Thanks. That profile shows us hanging in OS.File-related code, too. It looks like Firefox is hanging while trying to write to your hard drive, for some reason (which it needs to do periodically to e.g. save your open tabs to disk, so that we can recover in case of a crash). This is expected to be a fast in-the-background operation, but it's taking substantial time in your profiles for some reason.

Hopefully someone who knows more about our storage APIs might have some thoughts on next steps for diagnosis/investigation here.

And as mysteriously as this issue started, it has now disappeared. I did clear my cache so that might have had something to do with it.

Thank you for all your help. And thank you for Firefox!

Odd! Perhaps it was some sort of cache corruption then. I'm glad it's fixed, and thanks for the report in any case!

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME

(please reopen this bug if the issue crops up again.)

Performance Impact: --- → ?
Whiteboard: [qf]
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.