Download: Stable · Snapshot | Docs | Changes | Wishlist
PuTTY's current terminal emulator stores 32 bits per character in both the active terminal screen and the scrollback, and practically all of those bits are full. If we want to add more state (such as more colours or Unicode combining characters), we need to expand the data structure. But expanding the data structure throughout the terminal code will seriously increase the size of the (potentially very large amount of) scrollback stored in memory, so we don't like that approach.
What we want to do instead is to separate scrollback from the active
terminal screen by inventing a compressed format. So the
active terminal screen will use a small
character (making it easy in future to add new fields), but each row
structs will be compressed into a compact format for
storing in the scrollback, which will not waste space on any elements
of the per-character
struct which aren't actually used.
Since a scrollback line is never modified, the compressed format need
not be easy to change individual characters in.
That way, the chances are that the average user will experience a drop in memory footprint (since all their scrollback will end up smaller than it is right now), and yet the terminal emulator will acquire extra flexibility to have features added to it without impacting memory usage for people who don't use them.
SGT, 2004-10-13: I've now done the initial work for this.