bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#5749: 24.0.50; Gomoku startup latency


From: YAMAMOTO Mitsuharu
Subject: bug#5749: 24.0.50; Gomoku startup latency
Date: Wed, 24 Mar 2010 12:27:03 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Tue, 23 Mar 2010 21:51:24 -0400, Glenn Morris <address@hidden> said:

> Stephen Berman wrote:
>> 1. Let ~/.emacs consist of this sexp:
>> (setq initial-frame-alist '((fullscreen . fullheight)))
>> 2. Start Emacs with the above init file.
>> 3. M-x gomoku
>> => There is a noticeable delay loading the game -- on my system 3-4
>> seconds.

> This is interesting. Emacs 23.1 is almost instantaneous, but 23.1.94
> is very slow, and also starts using a huge amount of memory (1GB+ for me).
> Loading gomoku.el from 23.1 in 23.1.94 makes no difference.

This is due to a behavioral change of `append-to-buffer', which used
to preserve the point when the first argument coincides with the
current buffer.  The following patch would work for this case.

Maybe other occurrences of `(append-to-buffer (current-buffer) ...)'
should also be checked if they work as intended.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'lisp/play/gomoku.el'
*** lisp/play/gomoku.el 2010-01-13 08:35:10 +0000
--- lisp/play/gomoku.el 2010-03-24 03:04:35 +0000
***************
*** 1040,1046 ****
                    (= i (- m 2))
                    (progn
                      (while (>= i 3)
!                       (append-to-buffer (current-buffer) opoint (point))
                        (setq i (- i 2)))
                      (goto-char (point-max))))
               (setq point (point))
--- 1040,1046 ----
                    (= i (- m 2))
                    (progn
                      (while (>= i 3)
!                       (prepend-to-buffer (current-buffer) opoint (point))
                        (setq i (- i 2)))
                      (goto-char (point-max))))
               (setq point (point))







reply via email to

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