From: Timo Sirainen Date: Mon, 18 May 2020 17:34:27 +0000 (+0300) Subject: dict: Cork the output while writing iteration output X-Git-Tag: 2.3.13~512 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66610c9f007806e05912a43afed7e58fa8713bdd;p=thirdparty%2Fdovecot%2Fcore.git dict: Cork the output while writing iteration output This reduces system CPU usage by avoiding many tiny write() syscalls. Broken by 2ff2da52146609f4459bd0f7fd603e13400cb85e --- diff --git a/src/dict/dict-commands.c b/src/dict/dict-commands.c index 003a15e575..968ff84d6d 100644 --- a/src/dict/dict-commands.c +++ b/src/dict/dict-commands.c @@ -308,7 +308,9 @@ static void cmd_iterate_callback(void *context) struct dict_connection *conn = cmd->conn; dict_connection_ref(conn); + o_stream_cork(conn->conn.output); dict_connection_cmd_output_more(cmd); + o_stream_uncork(conn->conn.output); dict_connection_unref_safe(conn); }