From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9DE6E1F9FD for ; Mon, 22 Feb 2021 11:21:55 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 00/10] lei: avoid wasting IMAP connections Date: Mon, 22 Feb 2021 08:21:55 -0300 Message-Id: <20210222112155.32231-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This makes the code a bit less straightforward, unfortunately; but I've tried to comment it a bit and add some flow notes. The payoff is it saves IMAP connection setup costs which is noticeable in high-latency and/or metered bandwidth situations. LeiAuth is signficantly rewritten so it uses lei-daemon to route credentials from the first worker to other workers. Eric Wong (10): lei_auth: rename {nrd} field to {net} for clarity lei: keep client {sock} in short-lived workers lei: _lei_cfg: return empty hashref if unconfigured lei convert: auth directly from worker process lei import: no separate auth worker lei_auth: migrate common auth code from lei_import lei q: reduce wasted IMAP connection for auth net_reader: mic_get: reuse connections if cache enabled lei convert: inline convert_start lei_auth: trim and remove leftover worker code lib/PublicInbox/LEI.pm | 8 ++-- lib/PublicInbox/LeiAuth.pm | 76 +++++++++++++--------------------- lib/PublicInbox/LeiConvert.pm | 36 +++++++--------- lib/PublicInbox/LeiExternal.pm | 6 +-- lib/PublicInbox/LeiImport.pm | 60 ++++++++++++++++----------- lib/PublicInbox/LeiQuery.pm | 9 ++-- lib/PublicInbox/LeiToMail.pm | 53 ++++++++++++++++-------- lib/PublicInbox/LeiXSearch.pm | 26 ++++++++---- lib/PublicInbox/NetReader.pm | 20 +++++---- lib/PublicInbox/NetWriter.pm | 2 +- 10 files changed, 158 insertions(+), 138 deletions(-)