High CPU spinning in spent in JSON.stringify, bad performance. SessionSaveInternal_saveState() ?

VERIFIED INCOMPLETE

Status

()

defect
--
major
VERIFIED INCOMPLETE
6 years ago
3 years ago

People

(Reporter: wsmwk, Unassigned)

Tracking

({perf, steps-wanted})

Trunk
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

nightly 2013-01-14 build on dell laptop.
recently restarted firefox, 16 tabs open, about 220 tabs in sessionstore.js

profile from web console attached.
more data coming.
screen shot of data captured with dev profiler.
lastly, I've not had this kind of bad perf recently (except typical horrible jank at high tab counts from cycle collectors - which this doesn't seem to be) ...

So this feels like a regression.  Though I don't rule out addon. Or windows update, which just happened immediately prior to my startup.  Prior daily I was running is either 2014-01-11 or 2014-01-09
Attachment 8360642 [details] (FX_SESSION_RESTORE_SERIALIZE_DATA_MS) seems to confirm that all the time is spent in JSON.stringify. Other stuff is still too long, but this is the dominating cost.
to recap and add new info

- performance is intolerable/firefox unusable when started with normal mode (all addons) with sessionstore.js of 16 open tabs, and ~220 tabs not restored.  

- disabling treestyletabs addon (TST) 0.14.2013121400a220654 with the same sessionstore.js brings performance back to acceptable, normal level.  This is odd, because 
a) afaict TST has not updated recently
b) performance had been OK before restarting Firefox on Wednesday morning
c) started a december firefox build with the same TST and same sessionstore.js and see the same problem. I had previously not had trouble when using that december firefox.
Anyway, I will pursue an issue with TST.

- afaict performance does not improve further when Firefox is started with *no* sessionstore.js i.e. starting with no tabs.

So I'm not sure this meshes with your thoughts about the level of impact of session data serialization and planned improvements.

I hate to muddy the water but in interest of full disclosure, lately (for a few weeks) I do see another perf issue.  Often spinner on newly loaded tabs go on forever, as if network response is slow.  page load speed seems to improve somewhat (but still slow) when I focus a tab.
Whiteboard: [triage] [defect] p=0
(In reply to Wayne Mery (:wsmwk) from comment #9)

> 
> I hate to muddy the water but in interest of full disclosure, lately (for a
> few weeks) I do see another perf issue.  Often spinner on newly loaded tabs
> go on forever, as if network response is slow.  page load speed seems to
> improve somewhat (but still slow) when I focus a tab.


I too have been seeing this for some weeks now. The spinner keeps on spinning, as if the network is slow. And when i focus on a tab, the page loads, and the spinner stops.  
This usually happens when i open ~20 tabs together. For now, i have assumed this is an artifact of the new HTTP cache, which i have enabled.
mayankleoboy1, do you have any addons?  Thanks for the info

I have more conflicting data - memchaser addon also seems to cause issues. But it's not 100% reproducible. And only happening on one of my machines.  (as is the case for treestyletabs)
Flags: needinfo?(mayankleoboy1)
Posted file about support.txt
attaching the about:support for list of addons.
this issue seemed too vague to file a bug, so never did.
Flags: needinfo?(mayankleoboy1)
Blocks: fxdesktoptriage
No longer blocks: fxdesktopbacklog
Whiteboard: [triage] [defect] p=0 → [triage] p=0
(In reply to Wayne Mery (:wsmwk) from comment #9)
> - disabling treestyletabs addon (TST) 0.14.2013121400a220654 with the same
> sessionstore.js brings performance back to acceptable, normal level.

This sounds like it's an issue not related to core Firefox then? If this issue does not exist in safe-mode, can we close this? There isn't really enough actionable information here currently.
Flags: needinfo?(vseerror)
Saw something like this a couple days ago, under slow network conditions
No profiler, so I don't know if it was the same issue.
And unclear to me if it is addon or firefox.
Bears further investigation, which probably won't happen soon

BTW, I have the new cache enabled like mayankleoboy1

mayankleoboy1, can you still reproduce? Does it reproduce in safe mode? With newest nightly build?
Flags: needinfo?(vseerror) → needinfo?(mayankleoboy1)
(In reply to Wayne Mery (:wsmwk) from comment #14)
> Saw something like this a couple days ago, under slow network conditions

I have a 120KB/s connection, and when i open ~40 bugzilla tabs at one go, i reproduce this. 
So for me, its a combination of  slow connection, and a huge number of simultaneous tabs. 
Typically, the activity spinners of background tabs keep on rotating, but no data is being downloaded from net. When i focus on an unfocussed tab, its spinner stops, and the page "finishes loading".

> 
> mayankleoboy1, can you still reproduce? Does it reproduce in safe mode? With
> newest nightly build?

Can repro in latest nightly. But i didnt try in safe mode.
Flags: needinfo?(mayankleoboy1)
So we're jumping from cpu load, to the new http cache, to misbehaving add-ons, to loading issues on slow connections, what's the actual issue here? These are so many issues crammed into one bug filed on the probably wrong component that I really don't know what to do with this. I'm tempted to close this and encourage you to open new, specific bugs that we can tackle on by one.
yes, what's the issue (clear steps) is the question - whether it's straight up addon, or correlates to cache2, network speed, etc. So I'm happy for this to be unconfirmed pending more info. 

A separate question is whether mayankleoboy1's problem, i.e. steps to reproduce, turns out to be the same.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Keywords: steps-wanted
Blocks: fxdesktopbacklog
No longer blocks: fxdesktoptriage
Whiteboard: [triage] p=0 → p=0
No longer blocks: fxdesktopbacklog
Whiteboard: p=0
I'll take another look at this in July
Flags: needinfo?(vseerror)
symptoms simiar to bug 1022775. But not saying it is the same thing cause I didn't get to profile it.
See Also: → 1022775
Summary: High CPU, bad performance. SessionSaveInternal_saveState() ? → High CPU spinning in spent in JSON.stringify, bad performance. SessionSaveInternal_saveState() ?
(In reply to mayankleoboy1 from comment #10)
> (In reply to Wayne Mery (:wsmwk) from comment #9)
> 
> > 
> > I hate to muddy the water but in interest of full disclosure, lately (for a
> > few weeks) I do see another perf issue.  Often spinner on newly loaded tabs
> > go on forever, as if network response is slow.  page load speed seems to
> > improve somewhat (but still slow) when I focus a tab.
> 
> 
> I too have been seeing this for some weeks now. The spinner keeps on
> spinning, as if the network is slow. And when i focus on a tab, the page
> loads, and the spinner stops.  
> This usually happens when i open ~20 tabs together. For now, i have assumed
> this is an artifact of the new HTTP cache, which i have enabled.

I found an old note from 1/23/2014 with a profile, that I assume was related to my comment 9
http://people.mozilla.org/~bgirard/cleopatra/#report=1211a86468b97748cf7ffe85ee285b1b168e6041
See Also: → 581510
This bug has kind of spiraled out of control. It's really not clear from reading the comments if there's still an issue here.

I'm going to close this as incomplete. wsmwk, if you have new information to help make this bug more actionable, happy to hear it and re-open!
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(vseerror)
Resolution: --- → INCOMPLETE
Agreed, it's past resurrecting. Although related bug 581510 still is a solid concern.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.