unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier  <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: CVS version: message mode + flyspell terribly slow
Date: Fri, 28 Nov 2008 11:03:01 -0500	[thread overview]
Message-ID: <87zljjale2.fsf@cyd.mit.edu> (raw)

> > 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.




             reply	other threads:[~2008-11-28 16:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 16:03 Chong Yidong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-24 12:44 CVS version: message mode + flyspell terribly slow Klaus Zeitler
2008-11-24 19:00 ` Leo
2008-11-24 20:28 ` Chong Yidong
2008-11-26 20:19 ` Chong Yidong
2008-11-26 20:26   ` Chong Yidong
2008-11-26 20:58 ` Chong Yidong
2008-11-26 21:30   ` Chong Yidong
2008-11-27  2:52     ` Stefan Monnier
2008-11-27  3:42       ` Chong Yidong
2008-11-27 16:25         ` Stefan Monnier
2008-11-27 14:06     ` Klaus Zeitler
2008-11-27 18:23     ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zljjale2.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).