Re: Design Notes -- Piece Tables

Jeff Hostetler (jeff@abisource.com)
Fri, 28 Aug 1998 11:20:10 -0500


At 01:09 AM 8/28/98 -0700, John Brewer wrote:
>Actually, I was surprised to see you were using a buffer gap in the first
>place. As far as I know, all modern word processors use piece tables.

well (with sheepish grin), i was given a reference to it the other day.
prior to that i'd never heard of it. (a good way to think about this
is that i'm not contaminated by any big-brother-wanna-be's :-)
anyway, we're going forward with it.

>The downside is that the bookkeeping can be horrendous. Not so much in
>terms of speed or space, but understanding what's going on, and tracing
>through the data structures when things go wrong. Some well-placed
>instrumentation is probably in order.

yes, this is my fear. i was trying to explain to someone and drew a
couple of examples on a white board -- they really looked like a mess
and quite quickly.

>It might make sense to use multiple buffers, say one per paragraph or
>section, so that data paths don't get too random.

i'm not sure what that would do yet, but i'll think about it.
i'm currently considering using (or rather not precluding the
use of) multiple buffers to keep their sizes small so that maybe
we could do a Win16 or something.

>One of the coolest uses of piece tables I've seen was in WriteNow. When
>you saved a document, by default it kept the piece tables for the previous
>revision around, so you could essentially undo one "Save" operation. (I
>believe they called it "Revert to Backup", as opposed to "Revert to Saved).

did they put it all in the same file or did they keep multiple files
with version numbers or what? did they have an autosave and if so
how did it interact ?

i'd really hate to be out-cooled...

hey, thanks for the input/validation,
jeff



This archive was generated by hypermail 1.03b2.