emacs-devel
[Top][All Lists]
Advanced

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

Re: New package: resist!


From: Qiantan Hong
Subject: Re: New package: resist!
Date: Thu, 9 Dec 2021 06:59:05 +0000

> 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).

I do have an idea how to do it without loading the entire store,
by dividing the store into several “buckets” based on hash value
of they keys (and each bucket can be dynamically splitted,
essentially forming a trie). But I don’t know if it’s worth it.

Maybe let’s put the package in use first and see if that’s
necessary? It can be added (mostly) without changing
the interface. The only change I can see is, we may want
kv-store-filename to become kv-store-directory so
those bucket files are stored under it. Or we can retain
the current interface and add suffix to kv-store-filename.
Which one is more preferable?

reply via email to

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