webapp: speed up encode_and_buffer
authorHelmut Grohne <helmut@subdivi.de>
Wed, 29 Dec 2021 20:00:04 +0000 (21:00 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 29 Dec 2021 20:00:04 +0000 (21:00 +0100)
commit69a8861b704c969260ecb55110d8e41cd9aaf0a7
treebc508bc46be90509978ddb2e7fb77b630a21be80
parente118de84d60e6f0d7662dcbb6aa362f452dda6ba
webapp: speed up encode_and_buffer

We now know that our parameter is a jinja2.environment.TemplateStream.
Enable buffering and accumulate via an io.BytesIO to avoid O(n^2)
append.
webapp.py