Don't process literal data, but buffer and forward it instead.
It's possible that literal data contains CRLF's (thunderbird does that),
which resulted that large amounts of data were processed in small
This results in a lot of unnecessary processing (we shouldn't attempt to
apply rules to literal data), but that wasn't even the biggest
performance problem. Instead it turned out that calling
eimap:passthrough_data frequently with small chunks is very bad for
This turned out to have such a big performance impact that the client
would just time out.
We now recognize literals, and then simply buffer and foward without
further processing the literal data.
The buffering is done so we can avoid forwarding many small chunks.
Overall this makes the cases where literals contain CRLF's comparable to
literals that don't, and before we had about one order of magnitude