emacs-devel
[Top][All Lists]
Advanced

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

Re: persistent data feature


From: Qiantan Hong
Subject: Re: persistent data feature
Date: Sun, 12 Dec 2021 05:18:13 +0000

>>> I think a good fit to that would be incremental image.
>> 
>> Note that not all data can be saved incrementally. Org mode's cache is
>> currently using AVL-tree with extra links between nodes - it is a
>> full-scale circular object. I am not sure if there is a universal way to
>> store and update such data incrementally.
> 
> Doesn’t elisp’s printer detects cycles and print #0, #1, etc. where 
> needed?
I think there’s some confusion here.

My first “incremental” has a specific meaning in “incremental image”,
it means dumping part of the Lisp heap, compared to “full image”
which dump the whole heap. `prin1` can be viewed as a trivial
implementation of this, but usually this is done much more efficiently
by dumping out the memory representation directly.

I believe the “incremental” Ihor means is to store incremental changes
to a data structure/object graph, as what I did in resist!.el for hash
tables. This is indeed hard to do in general. Either we need to
modify the Elisp VM to add hook that detect changes, or we
need to do graph edit distance algorithm on different snapshots
of objects. It probably doesn’t worth the effort.

As what Ihor (I suppose) had in mind is incremental log operation,
prin1 is unrelated to this context because it prints out the whole object graph.

reply via email to

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