On 11 March 2010 15:22, Anthony Lieuallen <[email protected]> wrote:
> On 03/11/10 09:30, Kwah wrote:
>>
>> Which brings me to my question: do you have had much experience with
>> storing large amounts of data? If so, which methods did you use?
>
> None, besides testing.
> http://groups.google.com/group/greasemonkey-users/t/ca5a0dfac5c5998b
>
> How much is "large amounts"?  Really, be honest.  A few hundred K bytes
> won't make any difference.

In its current state (a completely unoptimised stringify'd json string
stored via GM_setValue) that I've been using for  for <24hours, I'm
upto ~250kb already. Bearing in mind that this I'm only about 2/3
through the first bulk run, it wouldn't be unreasonable to expect it
to reach around 300kb every 10days. I've not done much of the math yet
though so can't say with much certainty about projections like these.


After reading the message you linked to though, I'm wondering whether
it is an issue with the code rather than storage causing it to feel
sluggish on my end.



>
>> I've been thinking about it recently and I can think of a few options::
>
> I'd add: "provide a patch to Greasemonkey, such that GM_set values are
> stored in a sqlite DB (one per script) rather than in preferences". That,
> and SQL access to said DB has long been on the wishlist, but never high
> enough to get attention yet.

I would be interested in having a look at this but I'm really not sure
where to start (I've never worked with / looked at sqlite) but I
suppose google would be the best port of call in this case =]


>
>> * Store it using HTML5 storage
>
> I'd also strongly consider this route.  I'm very confident it's scalable to
> the point you need it to be.  And I'm also pretty sure that you have to try
> pretty darn hard to clear this out: a standard clear cache/cookies doesn't
> hit this store.
>

I've not tested this at all but according to the mozdev wiki [1],
clearing your recent history in the timescale 'everything' will clear
storage. Perhaps this has been fixed (I don't know, I've just taken it
for granted) but it occured to me that some people will clear
everything when they close the browser? As I said though, I've just
taken it for granted that the wiki is correct so if this isn't the
case I apologise.

<quote>
DOM Storage can be cleared via "Tools -> Clear Recent History ->
Cookies" when Time range is "Everything" (via
nsICookieManager::removeAll)

    * But not when another time range is specified: (bug 527667)
    * Does not show up in Tools -> Options -> Privacy -> Remove
individual cookies (bug 506692)
<quote>


[1] - 
https://developer.mozilla.org/en/DOM/Storage#Storage_location_and_clearing_the_data

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to