[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New package: resist!
From: |
Óscar Fuentes |
Subject: |
Re: New package: resist! |
Date: |
Thu, 09 Dec 2021 08:57:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Qiantan Hong <qhong@mit.edu> writes:
>> Does this package require the entire store to be loaded into memory in order
>> for a single value to be looked up or stored?
>>
>> It looks like it does (based on reading `kv-get', etc), but I might be
>> missing something.
>
> It is. According to my benchmark I don’t think this is a problem
> for most Emacs use cases (it loads 10k entry within 0.03s,
> I’ve tested longer list).
Was it with a cold disk cache? SSD or HDD? :-)
I'm afraid that you are focusing too much on a single metric.
You don't mention how large is each record, but anyway 10k records is a
tiny number for any serious database application. And then we have
memory pressure: apart from raw RAM usage, IIRC Emacs' garbage collector
traverses live objects, which means that Emacs becomes slower as the
info it holds grows. Then we have the persistence requirement: if we
want frequent, persistent updates to the database, having to write the
database's entire content each time we want to persist a change is
unacceptable. Then, if we want concurrent access from multiple sessions
(which itself requires some level of support for atomic operations) your
approach of reading and saving a big file becomes unfeasible in
practice, unless for tiny databases.
Don't get me wrong, I'm also worried about introducing sqlite support in
core. I'm afraid that it will be misused, a solution that creates
problems, so to speak, but it is undeniable that there are reasonable
uses for a proper database on Emacs.
- New package: resist!, Qiantan Hong, 2021/12/08
- Re: New package: resist!, Karl Fogel, 2021/12/08
- Re: New package: resist!, Tassilo Horn, 2021/12/09
- Re: New package: resist!, Qiantan Hong, 2021/12/09
- Re: New package: resist!, Tassilo Horn, 2021/12/09
- Re: New package: resist!, Qiantan Hong, 2021/12/09
- Re: New package: resist!, Qiantan Hong, 2021/12/10
- Re: New package: resist!, Stefan Monnier, 2021/12/10
- Re: New package: resist!, Qiantan Hong, 2021/12/10