From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: 16830@debbugs.gnu.org
Subject: bug#16830: [Bug] 24.3.50; massive slow down in forward-line
Date: Fri, 21 Feb 2014 13:16:07 +0100 [thread overview]
Message-ID: <20140221121606.GO7560@pille.home> (raw)
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.
next reply other threads:[~2014-02-21 12:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 12:16 Stefan-W. Hahn [this message]
2014-02-21 12:32 ` bug#16830: [Bug] 24.3.50; massive slow down in forward-line 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
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=20140221121606.GO7560@pille.home \
--to=stefan.hahn@s-hahn.de \
--cc=16830@debbugs.gnu.org \
/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).