From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: CVS version: message mode + flyspell terribly slow Date: Fri, 28 Nov 2008 11:03:01 -0500 Message-ID: <87zljjale2.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227888208 7414 80.91.229.12 (28 Nov 2008 16:03:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2008 16:03:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 28 17:04:31 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L65p2-0002kg-Dx for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2008 17:04:00 +0100 Original-Received: from localhost ([127.0.0.1]:35777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L65ns-0006lG-GT for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2008 11:02:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L65nm-0006l5-NI for emacs-devel@gnu.org; Fri, 28 Nov 2008 11:02:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L65nk-0006ko-Cw for emacs-devel@gnu.org; Fri, 28 Nov 2008 11:02:41 -0500 Original-Received: from [199.232.76.173] (port=38975 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L65nk-0006kl-AX for emacs-devel@gnu.org; Fri, 28 Nov 2008 11:02:40 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]:55830) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L65nj-0001rb-Rc for emacs-devel@gnu.org; Fri, 28 Nov 2008 11:02:39 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 413A957E194; Fri, 28 Nov 2008 11:03:01 -0500 (EST) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106265 Archived-At: > > Performance seems to be improved, but still noticeably worse than when > > the tool-bar is disabled. > > > > 1. emacs -Q --eval "(setq scroll-conservatively 10)" > > 2. C-h n > > 2a. M-x tool-bar-mode RET > > 3. C-n (press and hold down, causing continuous scrolling) > > > > When 2a is omitted, there are occasional pauses in scrolling. When > > the tool bar is disabled, scrolling is much smoother. > > Is that linked to the "dynamic keymap" as well (even though you've sped > it up with caching) or is there some other reason? I think it's likely to be related to the dynamic keymap. The pauses in scrolling are due to garbage collection. In the test case described above (i.e. scrolling the NEWS buffer continuously with scroll-conservatively on), garbage collection occurs once every three or four seconds when the tool-bar is enabled. When tool-bar is disabled, it occurs once every thirty seconds. My guess is that tool-bar-make-keymap is called so often that the consing it performs triggers frequent garbage collection. One thing to note is that the hash tables we use for caching the tool-bar keymaps are weak, so we have to recompute the keymaps after each gc. However, making the hash tables strong does not improve performance significantly.