From 079baf87df46ea2a5e97ed5f7d54cc9358c4622c Mon Sep 17 00:00:00 2001 From: Matthew Lear Date: Wed, 25 Mar 2015 18:21:06 +0000 Subject: [PATCH] Re: emacs / vim - time taken to open threads --- 92/d55acb783699c55906e21ee1d35844aeff4afe | 175 ++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 92/d55acb783699c55906e21ee1d35844aeff4afe diff --git a/92/d55acb783699c55906e21ee1d35844aeff4afe b/92/d55acb783699c55906e21ee1d35844aeff4afe new file mode 100644 index 000000000..194bccc9b --- /dev/null +++ b/92/d55acb783699c55906e21ee1d35844aeff4afe @@ -0,0 +1,175 @@ +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 5118F431FC0 + for ; Wed, 25 Mar 2015 04:21:16 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.738 +X-Spam-Level: * +X-Spam-Status: No, score=1.738 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, 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 O9BI78NpV+9z for ; + Wed, 25 Mar 2015 04:21:13 -0700 (PDT) +Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DDB02431FBC + for ; Wed, 25 Mar 2015 04:21:12 -0700 (PDT) +Received: from webmail04.plus.net ([84.93.228.66]) by avasout07 with smtp + id 7nM61q0031SbfYc01nM66W; Wed, 25 Mar 2015 11:21:09 +0000 +X-CM-Score: 0.00 +X-CNFS-Analysis: v=2.1 cv=fZwjyigF c=1 sm=1 tr=0 + a=C5+YawzV8SR07mwocaP9vA==:117 a=Pqgwzd+QtBWunNm/3vzkeA==:17 + a=0Bzu9jTXAAAA:8 + a=fne2aKG5GRsA:10 a=wPDyFdB5xvgA:10 a=80hmnl3cAAAA:8 a=emO1SXQWCLwA:10 + a=Q767GAiA_D4PB-lXPuYA:9 a=wPNLvfGTeEIA:10 a=tclcd6dtLQvEqt9_mmAA:9 + a=OFIISnGhPB6JD1Ix4xkA:9 +Received: from localhost ([127.0.0.1] helo=webmail.plus.net) + by webmail04.plus.net with esmtp (Exim 4.76) + (envelope-from ) + id 1YajMv-00040P-U0; Wed, 25 Mar 2015 11:21:06 +0000 +Received: from 216.31.211.11 (proxying for unknown) + (SquirrelMail authenticated user bubblegen+matt) + by webmail.plus.net with HTTP; Wed, 25 Mar 2015 11:21:06 -0000 +Message-ID: <49796ef89d505ab1039478982568a0b9.squirrel@webmail.plus.net> +In-Reply-To: +References: <5511DE10.80107@bubblegen.co.uk> + <87384u6lgb.fsf@maritornes.cs.unb.ca> + +Date: Wed, 25 Mar 2015 11:21:06 -0000 +Subject: Re: emacs / vim - time taken to open threads +From: "Matthew Lear" +To: "Tomi Ollila" +User-Agent: SquirrelMail +MIME-Version: 1.0 +Content-Type: multipart/mixed;boundary="----=_20150325112105_65244" +X-Priority: 3 (Normal) +Importance: Normal +Cc: Matthew Lear , notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +Reply-To: matt@bubblegen.co.uk +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 25 Mar 2015 11:21:16 -0000 + +------=_20150325112105_65244 +Content-Type: text/plain; charset="iso-8859-1" +Content-Transfer-Encoding: 8bit + +>> My experience is that the emacs interface is faster than the vim one. +>> At least I don't have an examples handy where emacs is slower than the +>> vim interface at rendering a thread. At a wild guess, I suspect it has +>> to do with how many attachments there are, and the emacs UI being +>> overenthusiastic about processing attachements. +> +> I've seen over 15 seconds of load time when opening some 20+ message +> thread -- and jumping through messages has been slow in emacs ui. + +Here's two attachments obtained using the in-built profiler in emacs 24 - +one for memory profiling and one for cpu. This particular thread took > 30 +secs to load and emacs was locked up the entire time. I'm no lisp expert, +but perhaps somebody could interpret this and possible suggest what could +be going on..? W.r.t. both cpu and memory usage, quite a lot of time seems +to be spent in indent-rigidly and notmuch-show-insert-thread. + +Cheers, +-- Matt +------=_20150325112105_65244 +Content-Type: text/plain; name="cpu.txt" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; filename="cpu.txt" + + +------=_20150325112105_65244 +Content-Type: text/plain; name="mem.txt" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; filename="mem.txt" + +- command-execute 1,274,239,745 99% + - call-interactively 1,274,239,745 99% + - notmuch-search-show-thread 1,244,222,992 97% + - notmuch-show 1,244,222,992 97% + - notmuch-show-build-buffer 1,244,184,644 97% + - notmuch-show-insert-forest 1,052,295,452 82% + - mapc 1,052,295,452 82% + - # 1,052,295,452 82% + - notmuch-show-insert-thread 1,052,295,452 82% + - mapc 1,052,295,452 82% + - # 1,052,295,452 82% + - notmuch-show-insert-tree 1,052,295,452 82% + - notmuch-show-insert-thread 840,006,831 65% + - mapc 840,006,831 65% + - # 840,006,831 65% + - notmuch-show-insert-tree 840,006,831 65% + - notmuch-show-insert-thread 475,772,280 37% + - mapc 475,772,280 37% + - # 475,772,280 37% + - notmuch-show-insert-tree 475,772,280 37% + - notmuch-show-insert-thread 393,675,698 30% + - mapc 393,675,698 30% + - # 393,675,698 30% + - notmuch-show-insert-tree 393,675,698 30% + - notmuch-show-insert-msg 393,670,578 30% + indent-rigidly 378,976,399 29% + + notmuch-show-insert-headers 8,573,181 0% + + notmuch-show-strip-re 38,912 0% + + notmuch-show-insert-headerline 21,748 0% + + notmuch-show-message-visible 5,264 0% + notmuch-show-set-message-properties 3,096 0% + make-overlay 1,418 0% + + notmuch-show-insert-msg 82,096,582 6% + - notmuch-show-insert-msg 364,233,495 28% + + notmuch-show-insert-body 237,892,232 18% + indent-rigidly 123,850,002 9% + + notmuch-show-insert-headers 377,077 0% + + notmuch-show-insert-headerline 85,340 0% + + notmuch-show-strip-re 20,556 0% + + notmuch-show-headers-visible 4,208 0% + + notmuch-show-message-visible 1,056 0% + - notmuch-show-insert-msg 212,283,421 16% + indent-rigidly 155,843,920 12% + + notmuch-show-insert-body 51,496,368 4% + + notmuch-show-insert-headers 379,990 0% + + notmuch-show-insert-headerline 93,694 0% + + notmuch-show-strip-re 17,802 0% + + notmuch-show-message-visible 1,056 0% + + notmuch-show-set-message-properties 1,056 0% + - notmuch-query-get-threads 180,741,671 14% + - apply 180,741,671 14% + - notmuch-call-notmuch-sexp 180,741,671 14% + - notmuch-call-notmuch--helper 175,917,905 13% + apply 175,917,905 13% + + make-temp-file 101,654 0% + generate-new-buffer 1,029 0% + + jit-lock-register 11,145,353 0% + + notmuch-show-strip-re 1,144 0% + replace-regexp-in-string 1,024 0% + + notmuch-show-goto-first-wanted-message 24,480 0% + + switch-to-buffer 12,839 0% + + helm-M-x 29,989,777 2% + + previous-line 17,280 0% + + next-line 9,696 0% ++ notmuch-show-command-hook 266,546 0% ++ ... 44,578 0% +- redisplay_internal (C function) 7,648 0% + file-remote-p 5,600 0% + + kill-this-buffer-enabled-p 2,048 0% + mouse-fixup-help-message 1,024 0% + +------=_20150325112105_65244-- + + -- 2.26.2