GNU bug report logs -
#861
Strange interaction of cursor movement and post-command-hook?
Previous Next
Reported by: rms <at> gnu.org
Date: Tue, 2 Sep 2008 01:20:04 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Internally, the two strings share most of their state.
The total amount of memory used is (roughly speaking)
the memory for saved_undo_point plus the memory
for just the string "foobar".
That is what I figured. What I am worried about is the "roughly".
There can be a lot of undo data, which is why there are special
features to control how much is saved. So the efficiency of storing
it is very important.
Note also that undo data covers more than just buffer contents.
(In reality, it's a little bit fancier than what is
described above in order to put an upper bound on
the amount of fragmentation of strings in memory.)
Those measures, which are clearly necessary, could impact the
efficiency of storing hundreds of past snapshots. This might cause
the amount of duplicated buffer text to increase, even drastically.
Or it might not.
Making this change to the buffer representation would not _require_
changing the undo data structure and mechanism. That one area of the
C code is fairly modular and independent of buffer internals.
It might hardly need any change. Other areas could take more work.
This bug report was last modified 15 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.