[Project_owners] String mapping database

Marco Pivetta ocramius at gmail.com
Sat Sep 20 20:25:06 PDT 2008


Hi!
I store up to 20 Mb of data with my addon for Ogame through Storage:
http://developer.mozilla.org/en/Storage

Take a look at it, it saved me from building up complex data structures as
the one you told of (I was already working on a folder-structured database
before discovering Storage!).
Very powerful, very very fast, just be careful with multiple connections to
your SQLite database and also with transactions... Transactions seem to be a
bit buggy...
Also remember that Insert queries are really slow on SQLite without using
transactions. I tested it on Firefox3 and 1000 inserts take up to 25 seconds
of time without transactions. The same inserts take 0.1 or less seconds with
transactions, but there's always the risk of having non-committed
transactions...

Here you can also find the SQL syntax used in Storage:
http://www.sqlite.org/lang.html

Hope it can be useful ;)

2008/9/21 Thomas Thurman <thomas at thurman.org.uk>

> Is there a way for an addon to keep a mapping from strings to strings on
> disk and query it, as you might with Berkely DB?  I could use an
> enormous JS literal object, but that would stay in memory in an
> inelegant and wasteful way.
>
> Sorry if there's something obvious I've missed-- I spent a while looking
> around but didn't find anything.
>
> peace
>
> Thomas
> --
> Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
> "A bearded pirate appears, catches sight of the dwarf and runs away.
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>



-- 
Standard Ogame Project - StOgame
http://www.stogame.net
Making Ogame a better place...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/project_owners/attachments/20080921/068240aa/attachment.html>


More information about the Project_owners mailing list