The system precompressed the static parts of the template, with matches only self-referencing inside each span of static content.
The dynamic parts of the template were prefixed with 'literal' tags.
This meant that serving a gzipped stream was as simple as concatenation, just as it was for normal uncompressed templates.
It could have been a lot cleverer - it could have huffman'ed the dynamic parts, for example - but it was an easy win.
Later, our Tornado servers were migrated behind a caching proxy and the whole purpose of serving up (partially) compressed pages vanished.
The system precompressed the static parts of the template, with matches only self-referencing inside each span of static content.
The dynamic parts of the template were prefixed with 'literal' tags.
This meant that serving a gzipped stream was as simple as concatenation, just as it was for normal uncompressed templates.
It could have been a lot cleverer - it could have huffman'ed the dynamic parts, for example - but it was an easy win.
Later, our Tornado servers were migrated behind a caching proxy and the whole purpose of serving up (partially) compressed pages vanished.