Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 719601 - High memory usage and long GC/CC times with 1Password add-on enabled
: High memory usage and long GC/CC times with 1Password add-on enabled
Product: Tech Evangelism
Classification: Other
Component: Add-ons (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
Blocks: LeakyAddons
  Show dependency treegraph
Reported: 2012-01-19 14:29 PST by Dave Hunt (:davehunt)
Modified: 2012-08-15 05:27 PDT (History)
13 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description Dave Hunt (:davehunt) 2012-01-19 14:29:08 PST
I'm seeing long GC/CC times and high memory usage with the 1Password extension enabled. The following was gathered using the MemChaser addon:

Resident: 1375MB, GC: 1633.0ms (8.272s), CC: 2537ms (8.376s)

In about:memory the largest single compartment is owned by 1Password:

189.40 MB (14.62%) -- compartment([System Principal], resource://onepasswo...

If I disable 1Password and restart Firefox then the memory usage and GC/CC never reach such levels.

1Password version is 3.9.0b6

You can currently download MemChaser from the following location:
Comment 1 Dave Hunt (:davehunt) 2012-01-19 15:40:19 PST
I just found a topic in the AgileBits support discussions, which suggests a new beta version will be available soon to address this.

Comment 2 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-01-20 11:37:48 PST
Which version(s) of Firefox is this reproducible?
Comment 3 Andrew McCreight [:mccr8] 2012-01-20 13:22:18 PST
The current version could be a good test case for incremental GC and improved CC, even if they fix the problem.
Comment 4 Dave Hunt (:davehunt) 2012-01-20 14:08:28 PST
I've so far replicated it specifically with Firefox 10 and 11. I can run with Firefox 9 for a while to see if it also occurs, however I suspect the majority of the users reporting the issue on the AgileBits discussion board are using released versions of Firefox.
Comment 5 Dave 2012-01-25 11:35:26 PST
Thanks for opening this bug Dave.

I just wanted to add a few things that might help:

First, beta 7 is out now and so beta 6 is no longer linked to anymore. You can download beta 6 directly from here:

Second, I managed to stop the bleeding in beta 7 by reworking our code. It's not ideal but I basically removed some functionality. The issue was I needed to iterate over all the elements in the DOM (in our end script). Simply by iterating over the elements Firefox's memory usage would increase dramatically. A great test page a user gave was this one:

While on this page if I looped through document.getElementsByTagName("*") memory usage would literally increase by over 200MB. Hopefully there is a better way to do this. 

I'll try to isolate the problem further and get it into a shareable state. I wonder, is there a typical Add-on SDK based extension template you guys use for testing? I could add my code there. The only big requirements is it must have an end script and be using the SDK.

Dave Teare
1Password Co-author
Comment 6 Jorge Villalobos [:jorgev] 2012-02-22 12:57:57 PST
Dave, have you made any progress with this you can share with us?
Comment 7 Jorge Villalobos [:jorgev] 2012-03-21 12:21:52 PDT
@Dave Teare, we would like to know what your current plans are for releasing version 3.9.0.

@Dave Hunt: can you please test with this version and see if it makes a difference?
Comment 8 Dave Hunt (:davehunt) 2012-03-22 04:27:30 PDT
I have tested with 1Password 3.9.0.b7 and Firefox 11, and replicated memory/performance issues.

Steps to reproduce:

1. Start Firefox with a fresh profile
2. Install 1Password from
3. Open
4. Use 1Password to sign in to Amazon
5. Open about:memory in another tab
6. Force refresh of about:memory, and the memory usage steadily increases. Ultimately GC/CCs increase in duration.

Note that this isn't realistic usage, but allowed me to replicate the increasing memory usage in a short time. I suspect leaving Firefox open with typical daily usage would replicate this over time. I will also attempt using this version of 1Password on my daily profile and report if I notice any noticeable performance issues.

I used MemChaser ( to monitor resident memory and GC/CC times, however I was able to replicate the issue with MemChaser disabled.

Unfortunately, it appears the AgileBits discussion is now marked private. If you create a profile you will be able to view it.

One of the recent suggestions was to disable the 'Auto Submit' feature. I've tried this and it makes no noticeable difference to the outcome of the above steps.
Comment 9 Kev Needham [:kev] 2012-04-12 08:12:18 PDT
Email sent to the folks at Agile Bits asking if there's an update or assistance that can be rendered.
Comment 10 Jorge Villalobos [:jorgev] 2012-04-18 12:13:17 PDT
I had a brief email discussion with Dave Teare and he mentioned a 3.9.2 version that addresses most if not all memory concerns. I asked him to post a link to a test build here, but he hasn't yet. I'll poke him again to see if we can move things along.
Comment 11 Dave 2012-04-19 12:10:34 PDT
Thanks for the nudge Jorge, this todo got lost in the shuffle. I get WAY too much email :)

Yes, this has been fixed in the latest version of the 1Password extension. While the vast majority of performance improvements were made in 3.9.0 beta 7 (as I mentioned above, it was from iterating over all the DOM elements) we had a regression in 3.9.1 related to DOM mutation events and this was fixed in 3.9.2. 

We're up to version 3.9.4 already so that's the one you'll likely want to verify. You can grab the latest version from here:

As far as I can tell all memory leaks except for one related to the AddOn SDK w/r/t context menus has been fixed. The context menu leak will be fixed when we upgrade to version 1.6.1 of the SDK. If you find any other leaks or performance problems, please show me how to recreate them and I'll be happy to look into it.


Dave Teare
AgileBits Founder
Comment 12 Jorge Villalobos [:jorgev] 2012-04-26 14:37:44 PDT
So, the main memory usage problems have been resolved, but there are still leaks associated to using an old version of the SDK. Once the add-on has been upgraded to 1.6.1 or higher, we can retest and verify everything is fixed.
Comment 13 Dave Hunt (:davehunt) 2012-05-09 07:09:25 PDT
I can confirm that the memory usage is much better in 3.9.4b1.
Comment 14 Andrew Williamson [:eviljeff] 2012-05-23 10:11:30 PDT
Dave Teare: do you know when you'll have a version available that uses SDK 1.6.1 (or higher) ?
Comment 15 Dave 2012-05-25 11:17:00 PDT
Hi Andrew,

I was hoping to get it done before WWDC but I'm running out of time. I'll try to release a beta with the new SDK once the dust settles and we're all back.
Comment 16 Jorge Villalobos [:jorgev] 2012-06-28 13:03:59 PDT
Dave, do you have any updates for us?
Comment 17 Dave 2012-07-14 15:54:06 PDT
Woops! I didn't reply right away and forgot. I'm sorry about that Jorge.

We just released a new beta that includes a newer version of the Addon SDK. It's available from this page (be sure to click the Allow betas checkbox):

The new beta uses version 1.8 of the Addon SDK. Please try the beta and see if the newer SDK helps.
Comment 18 Nicholas Nethercote [:njn] 2012-08-07 21:09:37 PDT
Dave Hunt, can you try the new version and report back whether it fixes your problems?  Thanks.
Comment 19 Dave Hunt (:davehunt) 2012-08-08 00:13:47 PDT
As mentioned in comment 13, the noticeable memory leak was already resolved in 3.9.4b1. I'm away until Monday, but can focus some time testing the latest version then. I have been using the latest version in my daily profile and haven't noticed any issues there.
Comment 20 Dave Hunt (:davehunt) 2012-08-15 05:25:55 PDT
I'm happy to marked this as resolved. I've just tried replicating with my steps from comment 8 and was unable to see any obvious memory leaks.
Comment 21 Dave Hunt (:davehunt) 2012-08-15 05:27:23 PDT
Tested against:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:14.0) Gecko/20100101 Firefox/14.0.1
1Password 3.9.6.b2

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