Nicholas Nethercote wrote on 2018-07-17 21:23:
This is a good example of how prefs is a far more general mechanism than I
would like, leading to all manner of use and abuse. "All I want is a
key-value store, with fast multi-threaded access, where the keys aren't
known ahead of time."
Agreed, the prefs service has been overloaded for too long due to the
lack of alternatives for storing key-value data.
I've been investigating the Lightning Memory-Mapped Database (LMDB)
storage engine for such use cases. It supports multi-threaded (and
multi-process) access and is optimized for fast reads of arbitrary keys.
It could conceivably handle this subset of prefs usage, along with a
variety of other KV storage use cases that currently use JSONFile or
other bespoke storage engines/formats.
Follow along in bug 1445451
(https://bugzilla.mozilla.org/show_bug.cgi?id=1445451) for status
updates on validating, landing, and using LMDB (via the rkv Rust crate).
-myk
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform