From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EIsZAB9TumKGJgAAbAwnHQ (envelope-from ) for ; Tue, 28 Jun 2022 03:02:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IKAcAB9TumIL6wAA9RJhRA (envelope-from ) for ; Tue, 28 Jun 2022 03:02:23 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 72DA75A34 for ; Tue, 28 Jun 2022 03:02:22 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id EE1E55E54D; Tue, 28 Jun 2022 01:02:18 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id D4C035E221 for ; Tue, 28 Jun 2022 01:02:15 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id B96355FBD0; Mon, 27 Jun 2022 21:02:14 -0400 (EDT) Received: (nullmailer pid 1569337 invoked by uid 1000); Tue, 28 Jun 2022 01:02:13 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: provide various lazy-show options Date: Mon, 27 Jun 2022 22:02:00 -0300 Message-Id: <20220628010205.1567784-1-david@tethera.net> X-Mailer: git-send-email 2.35.2 MIME-Version: 1.0 Message-ID-Hash: 4RH2TNYTZ7FEGI4GUJISASXXCXDMSBUE X-Message-ID-Hash: 4RH2TNYTZ7FEGI4GUJISASXXCXDMSBUE X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656378142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=ZsSSHaaWf96mMDrAQNtpcjnMneuvAVw3Y69oFCJxXtA=; b=cVhPzewgS0qAf0RZ4JduHvXb8A+YWG771OCNMv94kv7aNHvRyOqQ7MAd61QPZ13LQe4eD4 uglmiEaoUPooHU256VW4Xdl9rbDBVBRzOPgH+sm095VrBxxaueP6w0AwkU8CHAphmnWFNE /9iWYk2T+KUqXf21YT8UPiMR2yi0SyEnUPH0Ifkf/yNgpz2XnRenkTLpbpDXY9u1gsh8JO XDJrx8LfAcFghOOTA9m+z/tA9qv1Z7HZ7gMxNuaV/4yJLB8WMxz+TEiecIls1HMObsN+Pz S5N6j4HrsC3eIlSNW6mEfiIUi2XrWdTdZCx7iFKncTXPKtJeZt0Lg7RtKBRqDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656378142; a=rsa-sha256; cv=none; b=NnX/OeWc0LQb9Xhb7sSTSAu6jCiPleRMqpdQzR2To4c/FipbcwIyEKw+Tsdg2tK7KwPJYu jQRriBbqRZJ7UXTnEhgYPGqslfCtjussGzaVRKeFYTBuv9G3RooqYjQxw70WfX/Onzwso5 ImQ/VvZouvTAVCZAAqNRlG2T/8DNenm/nvNezuAczXHKGD6YZbWcWhQzde6pmehhjJWcAu /rPz8ilpTj1dlWwgOwB/7XGXAwu6xvnE7Y0QG569FoNDCpHx+k/y+LGR/9qY8etf6PKxl7 gg4QLV++YdZ/sawl5o3ZPLEnnMaA9tDv1e5l6BTQ3p0fOkqmZ2fuqp34m05qQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.17 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 72DA75A34 X-Spam-Score: -0.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: xlNytJamdxog It is a bit of an unfortunate profusion of options, but it isn't really clear to me yet if there is one best heuristic for all use-cases. The overall observation is that for most threads (even up to several hundred messages), the time to return the query from the notmuch CLI is much smaller than that to render it in emacs. This series expands upon some existing ideas of not rendering large text/* attachments to "lazily" render message bodies for messages satisfying certain criteria. In one of the introduced test cases this yields about a 10x speedup. Of course the comparison is not completly fair as the user probably has to do more work in opening messages to read them. I can imagine a couple of different UI improvements. One would be just choosing some better default values for the parameters discussed in this series. Another would be to provide a nice ui for temporarily changing them and re-rendering (perhaps analogous to the limit commands already present).