emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sqlite3


From: Lars Ingebrigtsen
Subject: Re: sqlite3
Date: Tue, 14 Dec 2021 09:57:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I think it'd be good to bring that into core, and then write a small
> wrapper library (well, a trivial ORM) for the rest of Emacs to use, so
> that we don't have to write SQL all over the place.  That is:
>
> (setf (persistent-data :namespace "emoji" :key "favorites") emoji--favorites)
>
> I.e., what Emacs needs is a persistent key/value store, and this would
> give us that.

This is now implemented under the name of `multisession-value' (but not
merged to the trunk yet; I'll probably do that later today, unless
somebody comes up with a better name).

As for the sqlite part of this: My initial benchmarking of this was
wrong.  I thought sqlite3 was going to be a real advantage for this
thing, since I'd benchmarked excellent performance (more than 50K
updates per second, for instance).  But that's only when not committing
after every transaction, which we want to do here, really.

But it turns out that sqlite3 is actually slower for this particular use
case than just writing the data to a file (i.e., using the file system
as the database; one file per value).  So multisession.el now offers two
backends (`files' and `sqlite'), and defaults to `files'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]