emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS version: message mode + flyspell terribly slow


From: Chong Yidong
Subject: Re: CVS version: message mode + flyspell terribly slow
Date: Fri, 28 Nov 2008 11:03:01 -0500

> > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]