From: "Richard M. Stallman" <rms@gnu.org>
To: David Kastrup <dak@gnu.org>
Cc: emacs-pretest-bug@gnu.org
Subject: bug#861: Strange interaction of cursor movement and post-command-hook?
Date: Mon, 01 Sep 2008 21:09:02 -0400 [thread overview]
Message-ID: <E1KaKOE-0004YV-2B@fencepost.gnu.org> (raw)
In-Reply-To: <x5bs2wsk5b.fsf@lola.goethe.zz> (message from David Kastrup on 04 Jan 2003 22:02:56 +0100)
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.
parent reply other threads:[~2008-09-02 1:09 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <x5bs2wsk5b.fsf@lola.goethe.zz>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KaKOE-0004YV-2B@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=861@emacsbugs.donarmstrong.com \
--cc=dak@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).