unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16830: [Bug] 24.3.50; massive slow down in forward-line
@ 2014-02-21 12:16 Stefan-W. Hahn
  2014-02-21 12:32 ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Stefan-W. Hahn @ 2014-02-21 12:16 UTC (permalink / raw)
  To: 16830

Good day,

I have measured a massive slow down for emacs24 on windows. I struggled
while using org-mode columnview, which takes for a short table several
minutes compared to a second with an older versino of emacs.

I tried to dig it down:

Running on an Core I7 Laptop with Windows 7/64 bit,
starting "emacs -q"

I got the  following times (elp measurement) for the org-mode function
org-goto-line:

Emacs 24.3.1 is ok, on Emacs 24.3.50 (I tested
https://www.dropbox.com/sh/3pgcb3iiy8s9irl/77pwM1O-5K/emacs-20140217-r116465-bin-i386.zip
) got a slow down of factor 10!!

org-goto-line (24.3.1)
test-org-goto-line  1           0.2           0.2
forward-line        10000       0.0640000000  6.40...e-006
widen               10000       0.003         3e-007
goto-char           10001       0.002         1.99...e-007

org-forward-line with narrow (24.3.1)
test-forward-line  1           0.042         0.042
forward-line       10000       0.003         3e-007
goto-char          1           0.0           0.0

org-forward-line without narrow (24.3.1)
test-forward-line  1           0.046         0.046
forward-line       10000       0.007         7e-007
goto-char          1           0.0           0.0


org-goto-line (24.3.50.1)
test-org-goto-line  1           2.141         2.141
forward-line        10000       1.8479999999  0.0001847999
goto-char           10001       0.006         5.99...e-007
widen               10000       0.005         5e-007

org-forward-line with narrow (24.3.50.1)
test-forward-line  1           0.102         0.102
forward-line       10000       0.0160000000  1.60...e-006
goto-char          1           0.0           0.0

org-forward-line without narrow (24.3.50.1)
test-forward-line  1           0.125         0.125
forward-line       10000       0.005         5e-007
goto-char          1           0.0           0.0

Problem seemss to be forward-line.

Tested with following test case:

#+BEGIN_SRC elisp
(defsubst my-org-goto-line (N)
  (save-restriction
    (widen)
    (goto-char (point-min))
    (forward-line (1- N))))

(defun test-org-goto-line ()
  (with-temp-buffer
    (open-line 10000)
    (goto-char (point-min))
    (narrow-to-region (point-min) (point-max))
    (dotimes (i 10000)
      (my-org-goto-line i)
      )
    )
  )

(defun test-forward-line (with-narrow)
  (with-temp-buffer
    (open-line 10000)
    (goto-char (point-min))
    (if with-narrow
        (narrow-to-region (point-min) (point-max)))
    (dotimes (i 10000)
      (forward-line 1)
      )
    )
  )

(defvar test-buffer nil)
(defun test-performance/org-goto-line ()
  (interactive)
  (elp-instrument-list '(test-org-goto-line forward-line goto-char widen))
  (test-org-goto-line)
  (let ((elp-recycle-buffers-p nil)
        rc)
    (elp-results)
    (setq rc (buffer-string))
    (kill-buffer)
    (with-current-buffer test-buffer
      (insert "org-goto-line ("
              emacs-version
              ")\n")
      (insert rc "\n"))
    )
  (elp-restore-all)
)

(defun test-performance/forward-line (with-narrow)
  (interactive)
  (elp-instrument-list '(test-forward-line forward-line goto-char widen))
  (test-forward-line with-narrow)
  (let ((elp-recycle-buffers-p nil)
        rc)
    (elp-results)
    (setq rc (buffer-string))
    (kill-buffer)
    (with-current-buffer test-buffer
      (insert (format "org-forward-line %s (" (if with-narrow "with narrow" "without narrow"))
              emacs-version
              ")\n")
      (insert rc "\n")))
  (elp-restore-all)
)

(defun test-performance ()
  (interactive)
  (setq test-buffer (generate-new-buffer "*Performance*"))
  (test-performance/org-goto-line)
  (test-performance/forward-line t)
  (test-performance/forward-line nil)
  (pop-to-buffer test-buffer))
#+END:

With kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-06-22 16:50 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 12:16 bug#16830: [Bug] 24.3.50; massive slow down in forward-line Stefan-W. Hahn
2014-02-21 12:32 ` Eli Zaretskii
2014-02-21 15:51   ` Stefan-W. Hahn
2014-02-21 17:50     ` Stefan Monnier
2014-02-22  8:38       ` Stefan-W. Hahn
     [not found]       ` <20140222083926.GC27381@pille.home>
2014-02-22  9:18         ` Eli Zaretskii
2014-02-22 11:08           ` Stefan-W. Hahn
2014-02-22 11:29             ` Eli Zaretskii
2014-02-22 11:36               ` Eli Zaretskii
2014-02-22 12:33                 ` Stefan-W. Hahn
2014-02-22 12:55                   ` Juanma Barranquero
2014-02-22 15:06                     ` Stefan-W. Hahn
2014-02-22 13:05                   ` Eli Zaretskii
2014-02-21  7:43                     ` Stefan-W. Hahn
2014-02-23 18:04                       ` Eli Zaretskii
2014-02-22 12:27               ` Stefan-W. Hahn
2014-03-10 18:58                 ` Eli Zaretskii
2014-03-11  8:08                   ` martin rudalics
2014-03-11 17:03                     ` Eli Zaretskii
2014-03-12 14:12                     ` Stefan Monnier
2014-03-16 16:32                       ` Eli Zaretskii
2014-03-17 15:05                   ` bug#16830: " Dmitry Antipov
2014-03-17 16:39                     ` Eli Zaretskii
2014-06-22 16:50                       ` Eli Zaretskii

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