Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9E6C3431FD0 for ; Thu, 10 Nov 2011 21:24:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EZP6dx49IdNO for ; Thu, 10 Nov 2011 21:24:51 -0800 (PST) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by olra.theworths.org (Postfix) with ESMTP id 235E8431FB6 for ; Thu, 10 Nov 2011 21:24:51 -0800 (PST) X-AuditID: 12074425-b7f116d0000008fe-8b-4ebcb1a20d2d Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id D2.CA.02302.2A1BCBE4; Fri, 11 Nov 2011 00:24:50 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id pAB5Ontd003996; Fri, 11 Nov 2011 00:24:49 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAB5OmFm007372 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 11 Nov 2011 00:24:49 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1ROje0-0002UR-1u; Fri, 11 Nov 2011 00:27:16 -0500 Date: Fri, 11 Nov 2011 00:27:16 -0500 From: Austin Clements To: Pieter Praet Subject: Re: [PATCH] emacs: Use a single buffer invisibility spec to fix quadratic search cost. Message-ID: <20111111052716.GU2658@mit.edu> References: <1320807328-13728-1-git-send-email-amdragon@mit.edu> <877h382jax.fsf@SSpaeth.de> <87d3czxsu9.fsf@praet.org> <20111111045341.GS2658@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111111045341.GS2658@mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IRYrdT0V20cY+fwYcGZYvrN2cyW/x+fYPZ Yumv3WwOzB47Z91l93i26hazR8e+y6wBzFFcNimpOZllqUX6dglcGb0dz9gKmrgqpnbsZWxg XMnexcjJISFgIvFo/SIoW0ziwr31bF2MXBxCAvsYJb7dmMQI4WxglLhw5xojSJWQwEkmicsL ciESSxglvi/cxQqSYBFQlbi77ivYKDYBDYlt+5eDNYgIKEucfvITLM4sYCUxcUc3C4gtLJAo 8XZSOzOIzSugLTF5fTcTxIInjBLHL3BAxAUlTs58wgLRqyVx499LoBoOIFtaYvk/sBJOAR2J SbeugY0XFVCRmHJyG9sERqFZSLpnIemehdC9gJF5FaNsSm6Vbm5iZk5xarJucXJiXl5qka6F Xm5miV5qSukmRnCou6juYJxwSOkQowAHoxIPL+ef3X5CrIllxZW5hxglOZiURHmvbNjjJ8SX lJ9SmZFYnBFfVJqTWnyIUYKDWUmEVzYPKMebklhZlVqUD5OS5mBREud9vcPBT0ggPbEkNTs1 tSC1CCYrw8GhJMHLD4xpIcGi1PTUirTMnBKENBMHJ8hwHqDhf0EW8xYXJOYWZ6ZD5E8xKkqJ 84qCNAuAJDJK8+B6YanoFaM40CvCvEwgVTzANAbX/QpoMBPQ4M3uu0EGlyQipKQaGCPnWppn Hzd/4+75djnfmp9fy7K+p1noNhbG3qpYd6HVU/yV6qRK9l/xjtk/V9948HHRzZmnX6kqM65U t9vieWmNWWy3bNnMtUb9kgY3PtxvU649VvFQwyXQJXhdgPqZ6jl3xAplTxmtP+EhNOn9ScY/ S9jibN51VR6fF3Q4SPN17wu2jPX9/5VYijMSDbWYi4oTAcfB9JcgAwAA Cc: notmuch@notmuchmail.org, servilio X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2011 05:24:51 -0000 Quoth myself on Nov 10 at 11:53 pm: > Quoth Pieter Praet on Nov 11 at 4:04 am: > > I've tried getting some hard numbers using > > > > #+begin_src sh > > time emacs --eval '(progn > > (notmuch) > > (notmuch-search "*") > > (while (get-buffer-process (current-buffer)) > > (sleep-for 0.1)) > > (kill-emacs))' > > #+end_src > > > > ... but the results vary wildly on subsequent runs. > > For me, this doesn't actually display the results buffer (though I > don't know why not), which means it won't test this, since the problem > lies in the Emacs redisplay logic. This may or may not actually be correct, but the following seems more representative on my system: time emacs --eval '(progn (notmuch) (notmuch-search "*") (while (get-buffer-process (current-buffer)) (redisplay) (sleep-for 0.1)) (kill-emacs))' This at least displays the buffer. I also tried (accept-process-output) instead of the (sleep-for 0.1), which clearly behaved differently, but gave only slightly higher numbers. If I timed just the search part, to exclude emacs start-up, I would have a better idea of which more closely matches my manual measurements.