From: Fabrice Niessen <fni-news-TA4HMoP+1wHrZ44/DZwexQ@public.gmane.org>
To: Nicolas Goaziou <n.goaziou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Eli Zaretskii <eliz-mXXj517/zsQ@public.gmane.org>,
emacs-orgmode-mXXj517/zsQ@public.gmane.org,
16832-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org
Subject: Re: bug#16832: Emacs goes crazy when deleting lines
Date: Thu, 20 Mar 2014 12:33:26 +0100 [thread overview]
Message-ID: <86siqdp0jd.fsf@somewhere.org> (raw)
In-Reply-To: <87ob17sag9.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (Nicolas Goaziou's message of "Sat, 15 Mar 2014 17:17:26 +0100")
Nicolas Goaziou wrote:
> Eli Zaretskii <eliz-mXXj517/zsQ@public.gmane.org> writes:
>
>> Thanks. So this looks like a problem with Org Mode. In particular,
>> org-element-inline-babel-call-successor takes a lot of time in this
>> case. That function traverses the buffer from top to bottom:
>>
>> (while (search-forward "call_" nil t)
>> (save-excursion
>> (goto-char (match-beginning 0))
>> (when (looking-at org-babel-inline-lob-one-liner-regexp)
>> (throw 'exit (cons 'inline-babel-call (point)))))))))
>
> This one is an updated function, which doesn't match posted report.
> I expect it to be faster than the previous implementation. It would be
> nice to have a new profiler report, though.
New test done just now. Still too slow (see video on
http://screencast.com/t/elBEfuZtd62), but much, much less...
There is an order of magnitude with the previous performance!
Excellent.
Environment:
- GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2014-03-15 on LEG570
- Org-mode version 8.2.5h (release_8.2.5h-808-g60a6c0), fetched 10 mins
ago
Performance report:
--8<---------------cut here---------------start------------->8---
- ... 2357 97%
- ad-activate 2343 97%
- ad-activate-advised-definition 2343 97%
- ad-make-cache-id 2343 97%
- ad-arglist 2343 97%
- require 2343 97%
- apply 2343 97%
- ad-Advice-require 2343 97%
- let 2343 97%
- let* 2343 97%
- org-element-at-point 2342 97%
- save-excursion 2342 97%
- save-restriction 2342 97%
- let 2342 97%
- cond 2342 97%
- org-element--parse-to 2342 97%
- catch 2342 97%
- save-excursion 2342 97%
- save-restriction 2342 97%
- let* 2342 97%
- let* 2017 83%
- prog1 2017 83%
- catch 2017 83%
- while 2017 83%
- if 2017 83%
- progn 2017 83%
- setq 2017 83%
- org-element--get-next-object-candidates 2017 83%
- delq 2017 83%
- if 2017 83%
- mapcar 2017 83%
- #<lambda 0x1741100e> 2017 83%
- funcall 2017 83%
- org-element-latex-or-entity-successor 912 37%
- save-excursion 912 37%
- let 912 37%
if 912 37%
- org-element-link-successor 389 16%
- save-excursion 389 16%
- let 389 16%
if 389 16%
- org-element-line-break-successor 215 8%
- save-excursion 215 8%
- let 215 8%
and 215 8%
- org-element-inline-src-block-successor 99 4%
- save-excursion 99 4%
if 99 4%
+ org-element-macro-successor 53 2%
+ org-element-footnote-reference-successor 53 2%
+ org-element-statistics-cookie-successor 53 2%
+ org-element-timestamp-successor 51 2%
+ org-element-target-successor 50 2%
+ org-element-radio-target-successor 49 2%
+ org-element-export-snippet-successor 47 1%
+ org-element-sub/superscript-successor 37 1%
+ org-element-text-markup-successor 8 0%
intern 1 0%
+ let 325 13%
+ cond 1 0%
Automatic GC 14 0%
+ flyspell-post-command-hook 28 1%
+ command-execute 17 0%
+ redisplay_internal (C function) 12 0%
--8<---------------cut here---------------end--------------->8---
Best regards,
Fabrice
--
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/
next prev parent reply other threads:[~2014-03-20 11:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86d2igl9x3.fsf@somewhere.org>
[not found] ` <mailman.15712.1393002495.10748.bug-gnu-emacs@gnu.org>
[not found] ` <861tys93qy.fsf@somewhere.org>
[not found] ` <mailman.15925.1393259354.10748.bug-gnu-emacs@gnu.org>
[not found] ` <86eh2r4ipj.fsf@somewhere.org>
[not found] ` <mailman.16008.1393345635.10748.bug-gnu-emacs@gnu.org>
[not found] ` <86bnxugmkv.fsf@somewhere.org>
[not found] ` <83txbly9xq.fsf@gnu.org>
[not found] ` <86y50xirtv.fsf@somewhere.org>
[not found] ` <mailman.16142.1393444275.10748.bug-gnu-emacs@gnu.org>
[not found] ` <86d2igl9x3.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
2014-03-14 16:00 ` bug#16832: Emacs goes crazy when deleting lines Fabrice Niessen
2014-03-15 15:47 ` Eli Zaretskii
2014-03-15 16:17 ` Nicolas Goaziou
2014-03-15 17:36 ` Eli Zaretskii
2014-03-15 17:57 ` Nicolas Goaziou
[not found] ` <87ob17sag9.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-20 11:33 ` Fabrice Niessen [this message]
2014-03-17 14:57 ` Stefan
[not found] ` <jwvsiqg6fn6.fsf-monnier+emacsbugs-mXXj517/zsQ@public.gmane.org>
2014-03-17 21:29 ` Fabrice Niessen
2014-03-17 23:28 ` Stefan
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86siqdp0jd.fsf@somewhere.org \
--to=fni-news-ta4hmop+1whrz44/dzwexq@public.gmane.org \
--cc=16832-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org \
--cc=eliz-mXXj517/zsQ@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
--cc=n.goaziou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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/org-mode.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).