Last Comment Bug 805246 - Social seems to use too much memory
: Social seems to use too much memory
Status: RESOLVED WORKSFORME
[fx17]
: meta
Product: Firefox
Classification: Client Software
Component: SocialAPI (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Shane Caraveo (:mixedpuppy)
Mentors:
Depends on: 806604 807363 807532 811247 811643 837729
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-24 16:00 PDT by (dormant account)
Modified: 2013-02-04 20:33 PST (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
about memory for sidebar + 1 chat box: 18.81+10.91+9.72+7.29+6.58=53.31mb (734 bytes, text/html)
2012-10-24 16:00 PDT, (dormant account)
no flags Details

Description (dormant account) 2012-10-24 16:00:00 PDT
Created attachment 674880 [details]
about memory for sidebar + 1 chat box: 18.81+10.91+9.72+7.29+6.58=53.31mb

Using social for an hour to chat with doug ends up using over 53mb. Closing the sidebar, chatbox only cuts 10mb off.
Comment 1 (dormant account) 2012-10-24 16:03:46 PDT
The ui to turn off social is missing here. I tried setting social.enabled/social.active to false, but 3 facebook compartments remained.
Comment 2 Justin Lebar (not reading bugmail) 2012-10-24 16:06:35 PDT
(In reply to Taras Glek (:taras) from comment #1)
> The ui to turn off social is missing here. I tried setting
> social.enabled/social.active to false, but 3 facebook compartments remained.

Even after minimizing memory usage?
Comment 3 (dormant account) 2012-10-24 16:08:58 PDT
(In reply to Justin Lebar [:jlebar] from comment #2)
> (In reply to Taras Glek (:taras) from comment #1)
> > The ui to turn off social is missing here. I tried setting
> > social.enabled/social.active to false, but 3 facebook compartments remained.
> 
> Even after minimizing memory usage?

yes
Comment 4 Jared Wein [:jaws] (please needinfo? me) 2012-10-24 16:11:53 PDT
https://bugzilla.mozilla.org/show_bug.cgi?id=802435 just landed but didn't make it into todays nightly.
Comment 5 Doug Turner (:dougt) 2012-10-24 16:14:24 PDT
(ftr, it was worth the memory for that much time w/ taras)
Comment 6 Justin Lebar (not reading bugmail) 2012-10-24 16:18:07 PDT
(In reply to Doug Turner (:dougt) from comment #5)
> (ftr, it was worth the memory for that much time w/ taras)

What do you mean?
Comment 7 (dormant account) 2012-10-24 16:52:54 PDT
(In reply to Taras Glek (:taras) from comment #0)
> Created attachment 674880 [details]
> about memory for sidebar + 1 chat box: 18.81+10.91+9.72+7.29+6.58=53.31mb
> 
> Using social for an hour to chat with doug ends up using over 53mb. Closing
> the sidebar, chatbox only cuts 10mb off.

Note a similar session in facebook.com tab takes up 33mb within a single compartment
Comment 8 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-10-24 17:47:52 PDT
Some of this may be overhead from having several compartments (sidebar, worker, notification panels), but some of it is certainly related to the fact that facebook.com and the social feature in Firefox are separate code bases.
Comment 9 Nicholas Nethercote [:njn] 2012-10-24 18:28:41 PDT
The attachment is wrong.  Don't use "save page as" for about:memory, just copy and paste its content.
Comment 10 Justin Lebar (not reading bugmail) 2012-10-24 18:47:14 PDT
We get so many creative ways of attaching about:memory to bugs; I wonder if we can make copy/paste more discoverable.
Comment 11 Nicholas Nethercote [:njn] 2012-10-24 19:27:40 PDT
We could add something about copy and paste to the list of instructions at the bottom.  Not sure if anyone reads those, though.
Comment 12 Justin Lebar (not reading bugmail) 2012-10-28 19:17:30 PDT
(In reply to Nicholas Nethercote [:njn] from comment #11)
> We could add something about copy and paste to the list of instructions at
> the bottom.  Not sure if anyone reads those, though.

We can continue this in bug 806264.
Comment 13 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-10-29 17:08:43 PDT
*** Bug 806604 has been marked as a duplicate of this bug. ***
Comment 14 Nicholas Nethercote [:njn] 2012-10-29 17:22:08 PDT
Note that bug 806264 was marked as a dup of this bug, but the report there involved a 208 MiB compartment for https://www.facebook.com/desktop/fbdesktop2/socialfox/fbworker.js.php, which is much bigger than the ones reported in this bug.
Comment 15 Nicholas Nethercote [:njn] 2012-10-30 16:21:45 PDT
> Note that bug 806264 was marked as a dup of this bug

Sorry, that should be bug 806604.

208 MiB for the fbworker compartment is a BFD, i.e. totally unacceptable.  Can one of the social API guys (Jared? Gavin?) take this bug and investigate, perhaps in concert with David Ascher (from bug 806604)?
Comment 16 Jared Wein [:jaws] (please needinfo? me) 2012-10-30 16:34:02 PDT
See https://bugzilla.mozilla.org/show_bug.cgi?id=806604#c5 for a response from one of the FB engineers. They plan to reload the worker every few hours to free up any leaked memory on their side.

I'm not sure what else we can do here though. I'd love to fix it if there was something I could do though.
Comment 17 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-10-31 09:50:12 PDT
We have two known memory issues: one report of large use by the worker (bug 806604), and overall high use by the flyout document (I'll file that separately). Let's use this as a meta bug to track.
Comment 18 (dormant account) 2012-10-31 11:18:28 PDT
(In reply to Taras Glek (:taras) from comment #1)
> The ui to turn off social is missing here. I tried setting
> social.enabled/social.active to false, but 3 facebook compartments remained.

Is anyone looking into this? Seems like the compartments should go away when social is disabled.
Comment 19 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-10-31 17:20:15 PDT
(In reply to Taras Glek (:taras) from comment #18)
> (In reply to Taras Glek (:taras) from comment #1)
> > The ui to turn off social is missing here. I tried setting
> > social.enabled/social.active to false, but 3 facebook compartments remained.
> 
> Is anyone looking into this? Seems like the compartments should go away when
> social is disabled.

Looks like the notification panels documents aren't being properly unloaded when the functionality is disabled. I filed bug 807532.
Comment 20 Nicholas Nethercote [:njn] 2012-11-13 21:02:22 PST
I'm removing the MemShrink tag because this is a meta-bug and we have MemShrink tags on each of the blocking bugs.
Comment 21 Nicholas Nethercote [:njn] 2013-02-01 13:44:05 PST
There's just a single bug blocking this one now.  Does this one need to still be open?
Comment 22 :Gavin Sharp [email: gavin@gavinsharp.com] 2013-02-01 15:13:53 PST
I think not.

Note You need to log in before you can comment on or make changes to this bug.