From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Bug?: Performance problem when loading file
Date: Fri, 7 Oct 2016 15:49:36 +0200 [thread overview]
Message-ID: <20161007134936.GB6719@seven> (raw)
Hello,
I'm using
Org-mode version 8.3.4 (release_8.3.4-1034-gadcaf9 @ /home/hs/.emacs.d/git/org-mode/lisp/)
on emacs 25.1/25.2.
With this version (also newer versions) I have a problem with loading files.
I normally switch all files with extensions ".org" and also ".txt" to
org-mode, even if the files are not a normal org file. This was no problem
in the past.
The problem happens on Linux and also on Windows (but more slow then on Linux).
With current version it is a performance problem if the file contains
following lines:
1111111111.222222 3 [xxxxxx_xxx]<0xffff> <<<XX-XXXXXXXXXX>>> XX X XXXX XX XXXX XX->XX Data(hex): ff => 04
The content is from a log file and the problematic content is the
"<<<XX-XXXXXXXXXX>>>" part. (If I change the "<<<", ">>>" to "<<", ">>" the
loading time in org-mode is ok.)
If I have a file with around 160 lines as above and switch this file from
fundamental-mode to org-mode it costs several seconds. A file with around
400K containing much of this lines costs minutes.
I made an elp-instrumented measurement and the problematic part seems to be
org-element-object-lex which called around 25760 times for the 160 lines
file. With a bigger file it is much more.
org-mode 1 1.089653152 1.089653152
org-update-radio-target-regexp 1 1.073683384 1.073683384
org-element-context 160 1.071594578 0.0066974661
org-element--object-lex 25760 0.9774005559 3.794...e-05
org-element-radio-target-parser 12880 0.2644946760 2.053...e-05
org-element-subscript-parser 12880 0.1016634290 7.893...e-06
org-element-link-parser 12880 0.0978871550 7.599...e-06
org-element-verbatim-parser 12720 0.0708337510 5.568...e-06
org-element-at-point 160 0.0616519250 0.0003853245
org-element--parse-to 160 0.0577311660 0.0003608197
org-element--current-element 160 0.0327868739 0.0002049179
org-element-paragraph-parser 160 0.0264464149 0.0001652900
org-element-timestamp-parser 12880 0.0113777200 8.833...e-07
org-mode-reftex-setup 1 0.005703614 0.005703614
..
Question: Is there a bug in org-element or is this behaviour intended?
With kind regards,
Stefan
--
Stefan-W. Hahn It is easy to make things.
It is hard to make things simple.
reply other threads:[~2016-10-07 14:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161007134936.GB6719@seven \
--to=stefan.hahn@s-hahn.de \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.