HomePhorge
Diffusion guam 5f47ee755231

Don't process literal data, but buffer and forward it instead.

Description

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
chunks.

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
throughput.

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
between them.

Details

Provenance
mollekopfAuthored on Oct 26 2020, 10:19 AM
mollekopfPushed on Oct 28 2020, 11:21 AM
Parents
rGe22d42e85666: Split once and then iterate over the lines
Branches
Unknown
Tags
Unknown
Build Status
Buildable 31564