Size of persistent storage

235 views
Skip to first unread message

Peter Meilstrup

unread,
Jul 24, 2007, 7:11:19 PM7/24/07
to greasemonkey-users
How large a value can be placed into persistent storage by
GM_setValue? The wiki makes reference to the existence of a limit, and
links to Firefox preferences documentation for details. But I am
unable to find mention of a limit in the linked Firefox documentation.

(I have a script needs to build up a table of UID/screenname
associations for a particular social networking site. This could
clearly become a moderately large string.)

-pm

Anthony Lieuallen

unread,
Jul 27, 2007, 10:14:39 AM7/27/07
to greasemon...@googlegroups.com
On 7/24/2007 7:11 PM, Peter Meilstrup wrote:
> How large a value can be placed into persistent storage by
> GM_setValue? The wiki makes reference to the existence of a limit,
> and links to Firefox preferences documentation for details. But I am
> unable to find mention of a limit in the linked Firefox
> documentation.

I've just tested this. Running up to a 32 meg string seems to work
without major issues, but 64 or 128 starts to thrash the disk for
virtual memory a fair deal.

I think the issue is the number of preferences more than the size of any
one string. But to be honest, I can't replicate that, either. After
setting and getting randomly named preferences in groups of 1000, the
time to do so is not growing. (Actually, after a restart to check how
many lines prefs.js was, it started going much faster!) And I'm running
over 50k distinct preferences now.

I suppose, ultimately, the real limitation is that all of the entire
preferences store is open in memory the whole time that Firefox is running.

Reply all
Reply to author
Forward
0 new messages