On Fri, Apr 26, 2013 at 11:36 AM, Andreas Gal <g...@mozilla.com> wrote: > Preferences are as the name implies intended for preferences. There is no > sane use case for storing data in preferences. I would give any patch I come > across doing that an automatic sr- for poor taste and general insanity.
As Greg suggests, that ship has kind of already sailed. In practice preferences often ends up being the "best" choice for storing some small amounts of data. Which is a sad state of affairs, to be sure - so I'm glad we have this thread to explore alternatives. > While (2) is a foot-gun, (3) is a guaranteed foot-nuke. While its easy to use > sqlite wrong, its almost guaranteed that you get your own atomic storage file > use wrong, across our N platforms. OS.File helps somewhat. Hand-rolled JSON-on-disk storage backends are starting to crop up in a lot of places. Also perhaps not a great state of affairs. > Chrome is working on replacing sqlite with leveldb for indexeddb and most > their storage needs. Last time we looked it wasn't ready for prime time. > Maybe it is now. This might be the best option. I have little experience actually trying to use indexedDB, so grain of salt etc., but my impression is that it's somewhat overkill for use cases currently addressed by preferences or custom JSON (e.g. a simple key-value store). Gavin _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform