all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug?: Performance problem when loading file
@ 2016-10-07 13:49 Stefan-W. Hahn
  0 siblings, 0 replies; only message in thread
From: Stefan-W. Hahn @ 2016-10-07 13:49 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-07 14:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07 13:49 Bug?: Performance problem when loading file Stefan-W. Hahn

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.