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.
It might make sense to use multiple buffers, say one per paragraph or
section, so that data paths don't get too random.
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).
Double-click anywhere with JarRunner! http://www.jera.com/jarrunner/