emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Opening an Org file slowed down
@ 2013-11-11 16:41 Michael Brand
  2013-11-11 17:02 ` Bastien
  2013-11-22 14:57 ` Michael Brand
  0 siblings, 2 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-11 16:41 UTC (permalink / raw)
  To: Org Mode

Hi all

I noticed that to open an Org file with a minimal example generated
like this slowed down:

#+BEGIN_SRC sh
  #!/bin/sh
  echo '* a'
  for ((i = 0; i < 400; i++)); do
      echo '  - b'
      echo '    :PROPERTIES:'
      echo '    :END:'
  done
#+END_SRC

Bisecting shows that release_8.2.1-161-g205e586 is fast and

release_8.2.1-162-gb392750

    commit b3927501081b1dab15540591d55f016ed4f9f948
    Author: Nicolas Goaziou <n.goaziou@gmail.com>
    Date:   Sat Nov 2 15:48:36 2013 +0100

        Prevent flagging drawers in example blocks

is slow. Today's release_8.2.2-192-ge3033d3 is between fast and slow but
mainly it also slows down disproportionate to increasing the number 400
above. Emacs is 24.3.2 (with -q).

My use case is that "  - b" is in fact "  * b" and is converted in a
hook to "*** b" with the help of "hidestarsfile" from "fileconversion"
described here:
http://orgmode.org/worg/org-hacks.html#hidestarsfile

Michael

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

* Re: Opening an Org file slowed down
  2013-11-11 16:41 Opening an Org file slowed down Michael Brand
@ 2013-11-11 17:02 ` Bastien
  2013-11-24 16:36   ` Nicolas Goaziou
  2013-11-22 14:57 ` Michael Brand
  1 sibling, 1 reply; 24+ messages in thread
From: Bastien @ 2013-11-11 17:02 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Hi Michael,

Michael Brand <michael.ch.brand@gmail.com> writes:

> release_8.2.1-162-gb392750
>
>     commit b3927501081b1dab15540591d55f016ed4f9f948
>     Author: Nicolas Goaziou <n.goaziou@gmail.com>
>     Date:   Sat Nov 2 15:48:36 2013 +0100
>
>         Prevent flagging drawers in example blocks
>
> is slow. Today's release_8.2.2-192-ge3033d3 is between fast and slow but
> mainly it also slows down disproportionate to increasing the number 400
> above. Emacs is 24.3.2 (with -q).

I noticed this too -- Nicolas, was the rationale for the rewrite just
to prevent drawers to get flagged when they find themselves in source
code blocks?  Or are there other cases the rewrite fixes?

Thanks,

-- 
 Bastien

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

* Re: Opening an Org file slowed down
  2013-11-11 16:41 Opening an Org file slowed down Michael Brand
  2013-11-11 17:02 ` Bastien
@ 2013-11-22 14:57 ` Michael Brand
  2013-11-23 10:52   ` Nicolas Goaziou
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Brand @ 2013-11-22 14:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Mon, Nov 11, 2013 at 5:41 PM, Michael Brand
<michael.ch.brand@gmail.com> wrote:
> I noticed that to open an Org file with a minimal example generated
> like this slowed down:
>
> #+BEGIN_SRC sh
>   #!/bin/sh
>   echo '* a'
>   for ((i = 0; i < 400; i++)); do
>       echo '  - b'
>       echo '    :PROPERTIES:'
>       echo '    :END:'
>   done
> #+END_SRC
>
> Bisecting shows that release_8.2.1-161-g205e586 is fast and
>
> release_8.2.1-162-gb392750
>
>     commit b3927501081b1dab15540591d55f016ed4f9f948
>     Author: Nicolas Goaziou <n.goaziou@gmail.com>
>     Date:   Sat Nov 2 15:48:36 2013 +0100
>
>         Prevent flagging drawers in example blocks
>
> is slow. Today's release_8.2.2-192-ge3033d3 is between fast and slow but
> mainly it also slows down disproportionate to increasing the number 400
> above. Emacs is 24.3.2 (with -q).
>
> My use case is that "  - b" is in fact "  * b" and is converted in a
> hook to "*** b" with the help of "hidestarsfile" from "fileconversion"
> described here:
> http://orgmode.org/worg/org-hacks.html#hidestarsfile

I still see the same problem with today's release_8.2.3c-271-gd0e8e57.
Can you reproduce it with the test Org file from my recipe?

Michael

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

* Re: Opening an Org file slowed down
  2013-11-22 14:57 ` Michael Brand
@ 2013-11-23 10:52   ` Nicolas Goaziou
  2013-11-24 13:49     ` Michael Brand
  2013-11-26 17:28     ` Nicolas Goaziou
  0 siblings, 2 replies; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-23 10:52 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Hello,

Michael Brand <michael.ch.brand@gmail.com> writes:

> On Mon, Nov 11, 2013 at 5:41 PM, Michael Brand
> <michael.ch.brand@gmail.com> wrote:
>> I noticed that to open an Org file with a minimal example generated
>> like this slowed down:
>>
>> #+BEGIN_SRC sh
>>   #!/bin/sh
>>   echo '* a'
>>   for ((i = 0; i < 400; i++)); do
>>       echo '  - b'
>>       echo '    :PROPERTIES:'
>>       echo '    :END:'
>>   done
>> #+END_SRC
>>
>> Bisecting shows that release_8.2.1-161-g205e586 is fast and
>>
>> release_8.2.1-162-gb392750
>>
>>     commit b3927501081b1dab15540591d55f016ed4f9f948
>>     Author: Nicolas Goaziou <n.goaziou@gmail.com>
>>     Date:   Sat Nov 2 15:48:36 2013 +0100
>>
>>         Prevent flagging drawers in example blocks
>>
>> is slow. Today's release_8.2.2-192-ge3033d3 is between fast and slow but
>> mainly it also slows down disproportionate to increasing the number 400
>> above. Emacs is 24.3.2 (with -q).
>>
>> My use case is that "  - b" is in fact "  * b" and is converted in a
>> hook to "*** b" with the help of "hidestarsfile" from "fileconversion"
>> described here:
>> http://orgmode.org/worg/org-hacks.html#hidestarsfile
>
> I still see the same problem with today's release_8.2.3c-271-gd0e8e57.
> Can you reproduce it with the test Org file from my recipe?

Yes, I can reproduce it.

I pushed a fix that should halve the time, but it will still be slow.

`org-element-at-point' is linear by the number of elements before point
in the current section. Therefore, parsing /all/ elements in a section
will be quadratic by the number of elements in the section.

With caching, an interesting coefficient is introduced before that n^2.
So, even though it's still quadratic, it will not be noticeable for most
situations (e.g. less that a couple hundreds elements in a section).

In you example, you're introducing 800 elements in the same section.
Among them 400 need to be parsed before the buffer is displayed. You're
way above the limit.

So, what can be done?

Please note that the parsing process is inherently linear, since we're
in a context-dependent grammar. Thus, there's not much to do about the
parsing algorithm.

However, the cache is always up-to-date. So, we are not bound to start
again from headline if we can find a cached element between it and the
point. The closer, the better.

I think there's room for improvement in this area. An idea could be to
start `org-element-at-point' with an opportunistic search. Before going
back to the headline, we could, indeed, `search-backward' on
`org-element-paragraph-start' a couple of times and check if location
found is already cached. This would work well when parsing successively
elements in the same section or when editing the current paragraph.

Anyway any idea must be carefully profiled.


Regards,

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-23 10:52   ` Nicolas Goaziou
@ 2013-11-24 13:49     ` Michael Brand
  2013-11-24 16:25       ` Nicolas Goaziou
  2013-11-26 17:28     ` Nicolas Goaziou
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Brand @ 2013-11-24 13:49 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Sat, Nov 23, 2013 at 11:52 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> I pushed a fix that should halve the time,

I see this effect, thank you.

> but it will still be slow.
>
> `org-element-at-point' is linear by the number of elements before point
> in the current section. Therefore, parsing /all/ elements in a section
> will be quadratic by the number of elements in the section.

To avoid the quadratic scaling in my use case of "fileconversion" I
think fileconversion should be improved to insert the leading stars
_before_ Org mode has finished turning on. In the past org-mode-hook
was simply used but it seems to have become the wrong choice for my
purpose.

First, I have an understanding question:

I tried to find where org-mode-hook is called within the function
org-mode but could not see something similar to the expected
"(run-hooks 'org-mode-hook)". So I added 'backtrace to the
org-mode-hook but don't understand it either:

    (backtrace)
      backtrace()
      run-hooks(change-major-mode-after-body-hook text-mode-hook
outline-mode-hook org-mode-hook)
      apply(run-hooks (change-major-mode-after-body-hook
text-mode-hook outline-mode-hook org-mode-hook))
      run-mode-hooks(org-mode-hook)
      org-mode()
      [...]

I see the expected "run-mode-hooks(org-mode-hook)" in this backtrace
but where is the corresponding form in the function org-mode?

Second, I guess it is not necessary to implement something like
org-mode-early-hook but I could not find yet an existing hook. Which
hook would you recommend for inserting the leading stars?

Michael

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

* Re: Opening an Org file slowed down
  2013-11-24 13:49     ` Michael Brand
@ 2013-11-24 16:25       ` Nicolas Goaziou
  2013-11-25 18:45         ` Michael Brand
  0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-24 16:25 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Hello,

Michael Brand <michael.ch.brand@gmail.com> writes:

> First, I have an understanding question:
>
> I tried to find where org-mode-hook is called within the function
> org-mode but could not see something similar to the expected
> "(run-hooks 'org-mode-hook)". So I added 'backtrace to the
> org-mode-hook but don't understand it either:
>
>     (backtrace)
>       backtrace()
>       run-hooks(change-major-mode-after-body-hook text-mode-hook
> outline-mode-hook org-mode-hook)
>       apply(run-hooks (change-major-mode-after-body-hook
> text-mode-hook outline-mode-hook org-mode-hook))
>       run-mode-hooks(org-mode-hook)
>       org-mode()
>       [...]
>
> I see the expected "run-mode-hooks(org-mode-hook)" in this backtrace
> but where is the corresponding form in the function org-mode?

It is implied by `define-derived-mode'.

> Second, I guess it is not necessary to implement something like
> org-mode-early-hook but I could not find yet an existing hook. Which
> hook would you recommend for inserting the leading stars?

I didn't look at your code, but can't you `defadvice' `org-mode'?


Regards,

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-11 17:02 ` Bastien
@ 2013-11-24 16:36   ` Nicolas Goaziou
  0 siblings, 0 replies; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-24 16:36 UTC (permalink / raw)
  To: Bastien; +Cc: Michael Brand, Org Mode

Hello,

Bastien <bzg@gnu.org> writes:

> I noticed this too -- Nicolas, was the rationale for the rewrite just
> to prevent drawers to get flagged when they find themselves in source
> code blocks?  Or are there other cases the rewrite fixes?

I somehow overlooked your message.

Anyway, preventing folding in a source block (or anywhere a drawer means
nothing) is but a side-effect, but it's the most visible one.

The real goal is to slowly introduce parsing functions in code base in
order to get a better grasp of what is needed for a complete switch.


Regards,

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-24 16:25       ` Nicolas Goaziou
@ 2013-11-25 18:45         ` Michael Brand
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-25 18:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Sun, Nov 24, 2013 at 5:25 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> I didn't look at your code, but can't you `defadvice' `org-mode'?

Yes, thank you for the advice to defadvice org-mode (with class
"before") to get the same effect like a hook would have at the
beginning of turning on org-mode. Preprocessing an Org file becomes
substantially faster this way than it was in org-mode-hook. See new
version 0.8 of fileconversion:
http://orgmode.org/worg/org-hacks.html#fileconversion

Michael

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

* Re: Opening an Org file slowed down
  2013-11-23 10:52   ` Nicolas Goaziou
  2013-11-24 13:49     ` Michael Brand
@ 2013-11-26 17:28     ` Nicolas Goaziou
  2013-11-26 19:53       ` Michael Brand
  1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-26 17:28 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

> Please note that the parsing process is inherently linear, since we're
> in a context-dependent grammar. Thus, there's not much to do about the
> parsing algorithm.
>
> However, the cache is always up-to-date. So, we are not bound to start
> again from headline if we can find a cached element between it and the
> point. The closer, the better.
>
> I think there's room for improvement in this area. An idea could be to
> start `org-element-at-point' with an opportunistic search. Before going
> back to the headline, we could, indeed, `search-backward' on
> `org-element-paragraph-start' a couple of times and check if location
> found is already cached. This would work well when parsing successively
> elements in the same section or when editing the current paragraph.

I implemented it.

`org-element-at-point' runs in a mean constant time now (worst case is
still linear, though).

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-26 17:28     ` Nicolas Goaziou
@ 2013-11-26 19:53       ` Michael Brand
  2013-11-26 20:09         ` Nicolas Goaziou
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Brand @ 2013-11-26 19:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Tue, Nov 26, 2013 at 6:28 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> I implemented it.
>
> `org-element-at-point' runs in a mean constant time now (worst case is
> still linear, though).

Thank you. As I wrote in the other post my recipe is not a real use
case any more for me so it doesn't really matter that opening the Org
file is still slow. My understanding why seems to be limited. But your
change makes a big difference for things like org-cycle on the only
heading or org-element-at-point at the very end, org-element-at-point
repeated many times to be able to notice the difference visually.

Michael

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

* Re: Opening an Org file slowed down
  2013-11-26 19:53       ` Michael Brand
@ 2013-11-26 20:09         ` Nicolas Goaziou
  2013-11-26 20:50           ` Michael Brand
  0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-26 20:09 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Hello,

Michael Brand <michael.ch.brand@gmail.com> writes:

> Thank you. As I wrote in the other post my recipe is not a real use
> case any more for me so it doesn't really matter that opening the Org
> file is still slow.

Is opening the file still slow? I get:

  org-mode                   1           0.458615558   0.458615558
  org-set-startup-visibility 1           0.454637818   0.454637818
  org-cycle-hide-drawers     2           0.450697582   0.225348791
  org-element-at-point       400         0.4234304369  0.001058576


Regards,

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-26 20:09         ` Nicolas Goaziou
@ 2013-11-26 20:50           ` Michael Brand
  2013-11-26 22:19             ` Nicolas Goaziou
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Brand @ 2013-11-26 20:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Tue, Nov 26, 2013 at 9:09 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Is opening the file still slow? I get:

What I don't understand is the still quadratic increase but if you
expect that for opening then it is ok for me. Uncompiled
release_8.2.3c-302-g15246d on a not new machine:

Open 400er:
org-mode                    1       6.877958      6.877958
org-set-startup-visibility  1       6.829008      6.829008
org-cycle-hide-drawers      2       6.813782      3.406891
org-element-at-point        400     6.784125      0.0169603125
org-element-cache-get       82199   1.2511399999  1.522...e-05
org-element-type            162000  0.6106539999  3.769...e-06

Open 800er:
org-mode                    1       29.970716     29.970716
org-set-startup-visibility  1       29.862721     29.862721
org-cycle-hide-drawers      2       29.85923      14.929615
org-element-at-point        800     29.639263000  0.0370490787
org-element-cache-get       324399  4.5316569999  1.396...e-05
org-element-type            644000  1.7653179999  2.741...e-06

Michael

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

* Re: Opening an Org file slowed down
  2013-11-26 20:50           ` Michael Brand
@ 2013-11-26 22:19             ` Nicolas Goaziou
  2013-11-27  9:24               ` Michael Brand
  0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2013-11-26 22:19 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Hello,

Michael Brand <michael.ch.brand@gmail.com> writes:

> What I don't understand is the still quadratic increase but if you
> expect that for opening then it is ok for me.

No, it should be linear. See below.

> Uncompiled release_8.2.3c-302-g15246d on a not new machine:
>
> Open 400er:
> org-mode                    1       6.877958      6.877958
> org-set-startup-visibility  1       6.829008      6.829008
> org-cycle-hide-drawers      2       6.813782      3.406891
> org-element-at-point        400     6.784125      0.0169603125
> org-element-cache-get       82199   1.2511399999  1.522...e-05
> org-element-type            162000  0.6106539999  3.769...e-06
>
> Open 800er:
> org-mode                    1       29.970716     29.970716
> org-set-startup-visibility  1       29.862721     29.862721
> org-cycle-hide-drawers      2       29.85923      14.929615
> org-element-at-point        800     29.639263000  0.0370490787
> org-element-cache-get       324399  4.5316569999  1.396...e-05
> org-element-type            644000  1.7653179999  2.741...e-06

For 800 I get (compiled)

  org-mode                   1           0.990066643   0.990066643
  org-set-startup-visibility 1           0.984746413   0.984746413
  org-cycle-hide-drawers     2           0.980225726   0.490112863
  org-element-at-point       800         0.7476192910  0.000934524

So, it is a linear increase here. Have you disabled cache?


Regards,

-- 
Nicolas Goaziou

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

* Re: Opening an Org file slowed down
  2013-11-26 22:19             ` Nicolas Goaziou
@ 2013-11-27  9:24               ` Michael Brand
  2013-11-27 11:27                 ` Nicolas Richard
  2013-11-27 18:13                 ` Achim Gratz
  0 siblings, 2 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-27  9:24 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

Hi Nicolas

On Tue, Nov 26, 2013 at 11:19 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> So, it is a linear increase here. Have you disabled cache?

No, but in the meantime I found accidentally how to get linear and
bisected it to be related with how Org is loaded:

1) start GNU Emacs with -L pointing to Org and with -Q
2) choice:
   - for quadratic do: M-x org-mode
   - for linear do: M-x org-version
3) M-x elp-instrument-package RET org
4) C-x f 400.org
5) M-x elp-results

GNU Emacs 24.3.1 and 24.3.2, Org unpatched and make uncompiled
release_8.2.3c-291-gbe8a1a and today's release_8.2.3c-303-g5a2dabc.
The same happens if in 1) I add my local patches for Org and all my
customization which includes already some implicit level of loading
Org.

This is beyond my knowledge, can you reproduce it?

Michael

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

* Re: Opening an Org file slowed down
  2013-11-27  9:24               ` Michael Brand
@ 2013-11-27 11:27                 ` Nicolas Richard
  2013-11-27 13:35                   ` Michael Brand
  2013-11-27 18:13                 ` Achim Gratz
  1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Richard @ 2013-11-27 11:27 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode, Nicolas Goaziou

Hi Michael,

Michael Brand <michael.ch.brand@gmail.com> writes:
> 2) choice:
>    - for quadratic do: M-x org-mode
>    - for linear do: M-x org-version

Can you show the output of
M-: (insert (mapconcat #'car load-history "\n"))
in each case ? It will output the list of loaded files, which hopefuly
shows a difference.

-- 
Nico.

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

* Re: Opening an Org file slowed down
  2013-11-27 11:27                 ` Nicolas Richard
@ 2013-11-27 13:35                   ` Michael Brand
  2013-11-27 17:10                     ` Nicolas Richard
  2013-11-27 22:06                     ` Achim Gratz
  0 siblings, 2 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-27 13:35 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: Org Mode, Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

Hi Nico

On Wed, Nov 27, 2013 at 12:27 PM, Nicolas Richard
<theonewiththeevillook@yahoo.fr> wrote:
> Can you show the output of
> M-: (insert (mapconcat #'car load-history "\n"))
> in each case ? It will output the list of loaded files, which hopefuly
> shows a difference.

It shows a difference, see attachements. It looks like but it was not
me loosing some first lines when doing this, I cross-checked :-).

Michael

[-- Attachment #2: org-mode.txt --]
[-- Type: text/plain, Size: 5833 bytes --]

org-mode/lisp/org-element.el
org-mode/lisp/org-rmail.el
org-mode/lisp/org-mhe.el
org-mode/lisp/org-irc.el
org-mode/lisp/org-info.el
org-mode/lisp/org-gnus.el
org-mode/lisp/org-docview.el
emacs/lisp/doc-view.elc
emacs/lisp/jka-compr.elc
emacs/lisp/image-mode.elc
emacs/lisp/dired.elc
org-mode/lisp/org-bibtex.el
emacs/lisp/textmodes/bibtex.elc
org-mode/lisp/org-bbdb.el
org-mode/lisp/org-w3m.el
org-mode/lisp/org.el
emacs/lisp/emacs-lisp/byte-opt.elc
emacs/lisp/emacs-lisp/warnings.elc
emacs/lisp/emacs-lisp/bytecomp.elc
emacs/lisp/emacs-lisp/cconv.elc
emacs/lisp/edmacro.elc
emacs/lisp/kmacro.elc
emacs/lisp/emacs-lisp/derived.elc
org-mode/lisp/org-macro.el
org-mode/lisp/org-footnote.el
org-mode/lisp/org-pcomplete.el
emacs/lisp/pcomplete.elc
org-mode/lisp/org-list.el
org-mode/lisp/org-faces.el
org-mode/lisp/org-entities.el
emacs/lisp/outline.elc
org-mode/lisp/org-version.el
org-mode/lisp/ob-emacs-lisp.el
org-mode/lisp/ob.el
org-mode/lisp/ob-tangle.el
org-mode/lisp/org-src.el
emacs/lisp/emacs-lisp/easy-mmode.elc
org-mode/lisp/ob-ref.el
org-mode/lisp/ob-lob.el
org-mode/lisp/ob-table.el
org-mode/lisp/ob-keys.el
org-mode/lisp/ob-exp.el
org-mode/lisp/ob-comint.el
emacs/lisp/comint.elc
emacs/lisp/ansi-color.elc
emacs/lisp/emacs-lisp/ring.elc
org-mode/lisp/ob-core.el
org-mode/lisp/ob-eval.el
org-mode/lisp/org-compat.el
emacs/lisp/emacs-lisp/advice.elc
emacs/lisp/help-fns.elc
org-mode/lisp/org-macs.el
org-mode/lisp/org-loaddefs.el
emacs/lisp/emacs-lisp/find-func.elc
emacs/lisp/calendar/calendar.elc
emacs/lisp/calendar/cal-menu.elc
emacs/lisp/calendar/cal-loaddefs.el
emacs/lisp/gnus/gnus-sum.elc
emacs/lisp/gnus/nnoo.elc
emacs/lisp/gnus/gnus-group.elc
emacs/lisp/gnus/gnus-undo.elc
emacs/lisp/gnus/nnmail.elc
emacs/lisp/gnus/mail-source.elc
emacs/lisp/gnus/gnus-start.elc
emacs/lisp/gnus/gnus-spec.elc
emacs/lisp/gnus/gnus-int.elc
emacs/lisp/gnus/gnus-range.elc
emacs/lisp/gnus/message.elc
emacs/lisp/emacs-lisp/cl-macs.elc
emacs/lisp/emacs-lisp/gv.elc
emacs/lisp/format-spec.elc
emacs/lisp/mail/rfc822.elc
emacs/lisp/gnus/mml.elc
emacs/lisp/emacs-lisp/easymenu.elc
emacs/lisp/gnus/mml-sec.elc
emacs/lisp/gnus/mm-decode.elc
emacs/lisp/gnus/mm-bodies.elc
emacs/lisp/gnus/mm-encode.elc
emacs/lisp/gnus/mail-parse.elc
emacs/lisp/gnus/rfc2231.elc
emacs/lisp/gnus/rfc2047.elc
emacs/lisp/gnus/rfc2045.elc
emacs/lisp/gnus/ietf-drums.elc
emacs/lisp/mail/mailabbrev.elc
emacs/lisp/gnus/gmm-utils.elc
emacs/lisp/mail/mailheader.elc
emacs/lisp/gnus/gnus-win.elc
emacs/lisp/gnus/gnus.elc
emacs/lisp/gnus/gnus-ems.elc
emacs/lisp/gnus/nnheader.elc
emacs/lisp/gnus/gnus-util.elc
emacs/lisp/mail/mail-utils.elc
emacs/lisp/gnus/mm-util.elc
emacs/lisp/gnus/mail-prsvr.elc
emacs/lisp/wid-edit.elc
emacs/lisp/emacs-lisp/cl.elc
emacs/lisp/emacs-lisp/cl-lib.elc
emacs/lisp/emacs-lisp/cl-loaddefs.el
emacs/lisp/calendar/time-date.elc
emacs/lisp/international/uni-mirrored.el
emacs/lisp/subdirs.el
emacs/leim/leim-list.el
emacs/lisp/tooltip.elc
emacs/lisp/vc/ediff-hook.elc
emacs/lisp/vc/vc-hooks.elc
emacs/lisp/emacs-lisp/float-sup.elc
emacs/lisp/mwheel.elc
emacs/lisp/term/x-win.elc
emacs/lisp/term/common-win.elc
emacs/lisp/x-dnd.elc
emacs/lisp/dynamic-setting.elc
emacs/lisp/tool-bar.elc
emacs/lisp/dnd.elc
emacs/lisp/international/fontset.elc
emacs/lisp/image.elc
emacs/lisp/emacs-lisp/regexp-opt.elc
emacs/lisp/fringe.elc
emacs/lisp/buff-menu.elc
emacs/lisp/emacs-lisp/tabulated-list.elc
emacs/lisp/replace.elc
emacs/lisp/newcomment.elc
emacs/lisp/textmodes/fill.elc
emacs/lisp/textmodes/text-mode.elc
emacs/lisp/emacs-lisp/lisp-mode.elc
emacs/lisp/textmodes/paragraphs.elc
emacs/lisp/register.elc
emacs/lisp/textmodes/page.elc
emacs/lisp/emacs-lisp/lisp.elc
emacs/lisp/menu-bar.elc
emacs/lisp/rfn-eshadow.elc
emacs/lisp/isearch.elc
emacs/lisp/emacs-lisp/timer.elc
emacs/lisp/select.elc
emacs/lisp/scroll-bar.elc
emacs/lisp/mouse.elc
emacs/lisp/jit-lock.elc
emacs/lisp/font-lock.elc
emacs/lisp/emacs-lisp/syntax.elc
emacs/lisp/facemenu.elc
emacs/lisp/font-core.elc
emacs/lisp/term/tty-colors.elc
emacs/lisp/frame.elc
emacs/lisp/indent.elc
emacs/lisp/language/cham.elc
emacs/lisp/language/burmese.elc
emacs/lisp/language/khmer.elc
emacs/lisp/language/georgian.elc
emacs/lisp/language/utf-8-lang.elc
emacs/lisp/language/misc-lang.elc
emacs/lisp/language/vietnamese.elc
emacs/lisp/language/tibetan.elc
emacs/lisp/language/thai.elc
emacs/lisp/language/tai-viet.elc
emacs/lisp/language/lao.elc
emacs/lisp/language/korean.elc
emacs/lisp/language/japanese.elc
emacs/lisp/international/eucjp-ms.el
emacs/lisp/international/cp51932.el
emacs/lisp/language/hebrew.elc
emacs/lisp/language/greek.elc
emacs/lisp/language/romanian.elc
emacs/lisp/language/slovak.elc
emacs/lisp/language/czech.elc
emacs/lisp/language/european.elc
emacs/lisp/language/ethiopic.elc
emacs/lisp/language/english.elc
emacs/lisp/language/sinhala.elc
emacs/lisp/language/indian.elc
emacs/lisp/language/cyrillic.elc
emacs/lisp/language/chinese.elc
emacs/lisp/composite.elc
emacs/lisp/international/characters.elc
emacs/lisp/international/uni-category.el
emacs/lisp/international/uni-bidi.el
emacs/lisp/international/charprop.el
emacs/lisp/case-table.elc
emacs/lisp/international/mule-cmds.elc
emacs/lisp/epa-hook.elc
emacs/lisp/jka-cmpr-hook.elc
emacs/lisp/help.elc
emacs/lisp/simple.elc
emacs/lisp/abbrev.elc
emacs/lisp/minibuffer.elc
emacs/lisp/loaddefs.el
emacs/lisp/startup.elc
emacs/lisp/button.elc
emacs/lisp/faces.elc
emacs/lisp/cus-face.elc
emacs/lisp/emacs-lisp/macroexp.elc
emacs/lisp/files.elc
emacs/lisp/window.elc
emacs/lisp/cus-start.elc
emacs/lisp/bindings.elc
emacs/lisp/format.elc
emacs/lisp/env.elc
emacs/lisp/international/mule-conf.elc
emacs/lisp/international/mule.elc
emacs/lisp/emacs-lisp/map-ynp.elc
emacs/lisp/custom.elc
emacs/lisp/widget.elc
emacs/lisp/version.elc
emacs/lisp/subr.elc
emacs/lisp/emacs-lisp/backquote.elc
emacs/lisp/emacs-lisp/byte-run.elc

[-- Attachment #3: org-version.txt --]
[-- Type: text/plain, Size: 5439 bytes --]

org-mode/lisp/org.el
emacs/lisp/emacs-lisp/byte-opt.elc
emacs/lisp/emacs-lisp/warnings.elc
emacs/lisp/emacs-lisp/bytecomp.elc
emacs/lisp/emacs-lisp/cconv.elc
emacs/lisp/edmacro.elc
emacs/lisp/kmacro.elc
emacs/lisp/emacs-lisp/derived.elc
org-mode/lisp/org-macro.el
org-mode/lisp/org-footnote.el
org-mode/lisp/org-pcomplete.el
emacs/lisp/pcomplete.elc
org-mode/lisp/org-list.el
org-mode/lisp/org-faces.el
org-mode/lisp/org-entities.el
emacs/lisp/outline.elc
org-mode/lisp/org-version.el
org-mode/lisp/ob-emacs-lisp.el
org-mode/lisp/ob.el
org-mode/lisp/ob-tangle.el
org-mode/lisp/org-src.el
emacs/lisp/emacs-lisp/easy-mmode.elc
org-mode/lisp/ob-ref.el
org-mode/lisp/ob-lob.el
org-mode/lisp/ob-table.el
org-mode/lisp/ob-keys.el
org-mode/lisp/ob-exp.el
org-mode/lisp/ob-comint.el
emacs/lisp/comint.elc
emacs/lisp/ansi-color.elc
emacs/lisp/emacs-lisp/ring.elc
org-mode/lisp/ob-core.el
org-mode/lisp/ob-eval.el
org-mode/lisp/org-compat.el
emacs/lisp/emacs-lisp/advice.elc
emacs/lisp/help-fns.elc
org-mode/lisp/org-macs.el
org-mode/lisp/org-loaddefs.el
emacs/lisp/emacs-lisp/find-func.elc
emacs/lisp/calendar/calendar.elc
emacs/lisp/calendar/cal-menu.elc
emacs/lisp/calendar/cal-loaddefs.el
emacs/lisp/gnus/gnus-sum.elc
emacs/lisp/gnus/nnoo.elc
emacs/lisp/gnus/gnus-group.elc
emacs/lisp/gnus/gnus-undo.elc
emacs/lisp/gnus/nnmail.elc
emacs/lisp/gnus/mail-source.elc
emacs/lisp/gnus/gnus-start.elc
emacs/lisp/gnus/gnus-spec.elc
emacs/lisp/gnus/gnus-int.elc
emacs/lisp/gnus/gnus-range.elc
emacs/lisp/gnus/message.elc
emacs/lisp/emacs-lisp/cl-macs.elc
emacs/lisp/emacs-lisp/gv.elc
emacs/lisp/format-spec.elc
emacs/lisp/mail/rfc822.elc
emacs/lisp/gnus/mml.elc
emacs/lisp/emacs-lisp/easymenu.elc
emacs/lisp/gnus/mml-sec.elc
emacs/lisp/gnus/mm-decode.elc
emacs/lisp/gnus/mm-bodies.elc
emacs/lisp/gnus/mm-encode.elc
emacs/lisp/gnus/mail-parse.elc
emacs/lisp/gnus/rfc2231.elc
emacs/lisp/gnus/rfc2047.elc
emacs/lisp/gnus/rfc2045.elc
emacs/lisp/gnus/ietf-drums.elc
emacs/lisp/mail/mailabbrev.elc
emacs/lisp/gnus/gmm-utils.elc
emacs/lisp/mail/mailheader.elc
emacs/lisp/gnus/gnus-win.elc
emacs/lisp/gnus/gnus.elc
emacs/lisp/gnus/gnus-ems.elc
emacs/lisp/gnus/nnheader.elc
emacs/lisp/gnus/gnus-util.elc
emacs/lisp/mail/mail-utils.elc
emacs/lisp/gnus/mm-util.elc
emacs/lisp/gnus/mail-prsvr.elc
emacs/lisp/wid-edit.elc
emacs/lisp/emacs-lisp/cl.elc
emacs/lisp/emacs-lisp/cl-lib.elc
emacs/lisp/emacs-lisp/cl-loaddefs.el
emacs/lisp/calendar/time-date.elc
emacs/lisp/international/uni-mirrored.el
emacs/lisp/subdirs.el
emacs/leim/leim-list.el
emacs/lisp/tooltip.elc
emacs/lisp/vc/ediff-hook.elc
emacs/lisp/vc/vc-hooks.elc
emacs/lisp/emacs-lisp/float-sup.elc
emacs/lisp/mwheel.elc
emacs/lisp/term/x-win.elc
emacs/lisp/term/common-win.elc
emacs/lisp/x-dnd.elc
emacs/lisp/dynamic-setting.elc
emacs/lisp/tool-bar.elc
emacs/lisp/dnd.elc
emacs/lisp/international/fontset.elc
emacs/lisp/image.elc
emacs/lisp/emacs-lisp/regexp-opt.elc
emacs/lisp/fringe.elc
emacs/lisp/buff-menu.elc
emacs/lisp/emacs-lisp/tabulated-list.elc
emacs/lisp/replace.elc
emacs/lisp/newcomment.elc
emacs/lisp/textmodes/fill.elc
emacs/lisp/textmodes/text-mode.elc
emacs/lisp/emacs-lisp/lisp-mode.elc
emacs/lisp/textmodes/paragraphs.elc
emacs/lisp/register.elc
emacs/lisp/textmodes/page.elc
emacs/lisp/emacs-lisp/lisp.elc
emacs/lisp/menu-bar.elc
emacs/lisp/rfn-eshadow.elc
emacs/lisp/isearch.elc
emacs/lisp/emacs-lisp/timer.elc
emacs/lisp/select.elc
emacs/lisp/scroll-bar.elc
emacs/lisp/mouse.elc
emacs/lisp/jit-lock.elc
emacs/lisp/font-lock.elc
emacs/lisp/emacs-lisp/syntax.elc
emacs/lisp/facemenu.elc
emacs/lisp/font-core.elc
emacs/lisp/term/tty-colors.elc
emacs/lisp/frame.elc
emacs/lisp/indent.elc
emacs/lisp/language/cham.elc
emacs/lisp/language/burmese.elc
emacs/lisp/language/khmer.elc
emacs/lisp/language/georgian.elc
emacs/lisp/language/utf-8-lang.elc
emacs/lisp/language/misc-lang.elc
emacs/lisp/language/vietnamese.elc
emacs/lisp/language/tibetan.elc
emacs/lisp/language/thai.elc
emacs/lisp/language/tai-viet.elc
emacs/lisp/language/lao.elc
emacs/lisp/language/korean.elc
emacs/lisp/language/japanese.elc
emacs/lisp/international/eucjp-ms.el
emacs/lisp/international/cp51932.el
emacs/lisp/language/hebrew.elc
emacs/lisp/language/greek.elc
emacs/lisp/language/romanian.elc
emacs/lisp/language/slovak.elc
emacs/lisp/language/czech.elc
emacs/lisp/language/european.elc
emacs/lisp/language/ethiopic.elc
emacs/lisp/language/english.elc
emacs/lisp/language/sinhala.elc
emacs/lisp/language/indian.elc
emacs/lisp/language/cyrillic.elc
emacs/lisp/language/chinese.elc
emacs/lisp/composite.elc
emacs/lisp/international/characters.elc
emacs/lisp/international/uni-category.el
emacs/lisp/international/uni-bidi.el
emacs/lisp/international/charprop.el
emacs/lisp/case-table.elc
emacs/lisp/international/mule-cmds.elc
emacs/lisp/epa-hook.elc
emacs/lisp/jka-cmpr-hook.elc
emacs/lisp/help.elc
emacs/lisp/simple.elc
emacs/lisp/abbrev.elc
emacs/lisp/minibuffer.elc
emacs/lisp/loaddefs.el
emacs/lisp/startup.elc
emacs/lisp/button.elc
emacs/lisp/faces.elc
emacs/lisp/cus-face.elc
emacs/lisp/emacs-lisp/macroexp.elc
emacs/lisp/files.elc
emacs/lisp/window.elc
emacs/lisp/cus-start.elc
emacs/lisp/bindings.elc
emacs/lisp/format.elc
emacs/lisp/env.elc
emacs/lisp/international/mule-conf.elc
emacs/lisp/international/mule.elc
emacs/lisp/emacs-lisp/map-ynp.elc
emacs/lisp/custom.elc
emacs/lisp/widget.elc
emacs/lisp/version.elc
emacs/lisp/subr.elc
emacs/lisp/emacs-lisp/backquote.elc
emacs/lisp/emacs-lisp/byte-run.elc

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

* Re: Opening an Org file slowed down
  2013-11-27 13:35                   ` Michael Brand
@ 2013-11-27 17:10                     ` Nicolas Richard
  2013-11-27 22:06                     ` Achim Gratz
  1 sibling, 0 replies; 24+ messages in thread
From: Nicolas Richard @ 2013-11-27 17:10 UTC (permalink / raw)
  To: Michael Brand; +Cc: Nicolas Goaziou, Org Mode

Michael Brand <michael.ch.brand@gmail.com> writes:
> On Wed, Nov 27, 2013 at 12:27 PM, Nicolas Richard
>> M-: (insert (mapconcat #'car load-history "\n"))
>
> It shows a difference, see attachements.

It seems from my own tests that in the `org-version' case, org-element
is in fact not used.

Example with org-element loaded:

$ emacs --batch -Q -L /home/youngfrog/sources/org-mode/lisp -l org-element --eval '(elp-instrument-package "org")' 400.org --eval '(elp-results)'
OVERVIEW
Loading vc-git...
Function Name                                       Call Count  Elapsed Time  Average Time
==================================================  ==========  ============  ============
org-mode                                            1           5.400860453   5.400860453
org-set-startup-visibility                          1           5.313854095   5.313854095
org-cycle-hide-drawers                              2           5.3121005389  2.6560502694
org-element-at-point                                400         5.266095204   0.0131652380
org-element-cache-get                               82199       0.6185547400  7.525...e-06
org-element-type                                    162000      0.2590344329  1.598...e-06
org-element-put-property                            81401       0.1565762810  1.923...e-06
org-element--current-element                        1201        0.1494111070  0.0001244055
org-element-property                                88592       0.1363126259  1.538...e-06
org-element--cache-pending-changes-p                82197       0.1144674349  1.392...e-06
org-load-modules-maybe                              2           0.08437738    0.04218869
org-flag-drawer                                     400         0.0376304490  9.407...e-05
org-element-item-parser                             400         0.0275906270  6.897...e-05
org-element-cache-put                               1201        0.0250324789  2.084...e-05
org-element-cache-reset                             1           0.023597284   0.023597284
org-element--list-struct                            1           0.010440769   0.010440769
org-element-paragraph-parser                        400         0.0072944419  1.823...e-05
org-at-heading-p                                    2801        0.0071912889  2.567...e-06
org-get-limited-outline-regexp                      2401        0.0061038529  2.542...e-06
org-match-string-no-properties                      1200        0.0054390299  4.532...e-06
org-element-property-drawer-parser                  400         0.0045985369  1.149...e-05
org-element--collect-affiliated-keywords            401         0.0031594279  7.878...e-06
org-looking-at-p                                    2399        0.0028486419  1.187...e-06
org-list-get-tag                                    400         0.0027069029  6.767...e-06
org-string-match-p                                  1199        0.0020501510  1.709...e-06
org-cycle-show-empty-lines                          2           0.000984001   0.0004920005
org-list-get-nth                                    400         0.0008991660  2.247...e-06
org-cycle                                           1           0.000850248   0.000850248
org-cycle-internal-global                           1           0.000763145   0.000763145
org-set-regexps-and-options                         1           0.000669289   0.000669289
org-element-plain-list-parser                       1           0.000519329   0.000519329
org-add-link-type                                   8           0.0004422659  5.528...e-05
org-element-restriction                             401         0.0004163749  1.038...e-06
org-macro-initialize-templates                      1           0.000405989   0.000405989
org-make-link-regexps                               8           0.0003423549  4.279...e-05
org-set-visibility-according-to-property            1           0.000317979   0.000317979
org-babel-hide-all-hashes                           1           0.000316974   0.000316974
org-macro--collect-macros                           1           0.000306365   0.000306365
org-overview                                        1           0.000227539   0.000227539
org-set-regexps-and-options-for-tags                1           0.000193121   0.000193121
org-update-radio-target-regexp                      1           0.000179085   0.000179085
org-all-targets                                     1           0.000164694   0.000164694
org-install-agenda-files-menu                       1           0.00012613    0.00012613
org-set-local                                       45          7.178...e-05  1.595...e-06
org-unlogged-message                                1           5.5189e-05    5.5189e-05
org-setup-filling                                   1           4.4196e-05    4.4196e-05
org-add-hook                                        5           2.937...e-05  5.874e-06
org-find-invisible-foreground                       1           2.9127e-05    2.9127e-05
org-set-font-lock-defaults                          1           2.9031e-05    2.9031e-05
org-setup-comments-handling                         1           2.7605e-05    2.7605e-05
org-cycle-hide-archived-subtrees                    2           2.2149e-05    1.10745e-05
org-outline-level                                   2           1.9673e-05    9.8365e-06
org-cycle-item-indentation                          1           1.7888e-05    1.7888e-05
org-at-item-p                                       1           1.3829e-05    1.3829e-05
org-hide-archived-subtrees                          1           1.2179e-05    1.2179e-05
org-assign-fast-keys                                1           1.2102e-05    1.2102e-05
org-babel-hide-result-toggle-maybe                  1           1.0614e-05    1.0614e-05
org-extract-log-state-settings                      2           8.745e-06     4.3725e-06
org-make-options-regexp                             2           8.394e-06     4.197e-06
org-compute-latex-and-related-regexp                1           8.306e-06     8.306e-06
org-at-table-p                                      2           7.307e-06     3.6535e-06
org-back-to-heading                                 2           7.261...e-06  3.630...e-06
org-cycle-level                                     1           6.653e-06     6.653e-06
org-item-re                                         3           5.786e-06     1.928...e-06
org-agenda-files                                    1           4.545e-06     4.545e-06
org-hide-block-toggle-maybe                         1           4.385e-06     4.385e-06
org-optimize-window-after-visibility-change         1           3.428e-06     3.428e-06
org-defvaralias                                     1           2.774e-06     2.774e-06
org-point-at-end-of-empty-headline                  1           2.217e-06     2.217e-06
org-uniquify                                        1           2.12e-06      2.12e-06
org-delete-all                                      1           1.552e-06     1.552e-06
org-babel-header-arg-expand                         1           1.451e-06     1.451e-06
org-restart-font-lock                               1           1.352e-06     1.352e-06
org-babel-result-hide-spec                          1           1.313e-06     1.313e-06
org-cycle-hide-inline-tasks                         1           1.071e-06     1.071e-06
org-last                                            1           8.92e-07      8.92e-07
org-make-target-link-regexp                         1           7.22e-07      7.22e-07
org-src-native-tab-command-maybe                    1           6.71e-07      6.71e-07

Example with just org loaded :

$ emacs --batch -Q -L /home/youngfrog/sources/org-mode/lisp -l org --eval '(elp-instrument-package "org")' 400.org --eval '(elp-results)'
OVERVIEW
Loading vc-git...
Function Name                                       Call Count  Elapsed Time  Average Time
==================================================  ==========  ============  ============
org-mode                                            1           1.81576679    1.81576679
org-set-startup-visibility                          1           1.684879967   1.684879967
org-cycle-hide-drawers                              2           1.683092877   0.8415464385
org-load-modules-maybe                              2           0.082674777   0.0413373885
org-setup-filling                                   1           0.045604327   0.045604327
org-at-heading-p                                    2801        0.0302115869  1.078...e-05
org-flag-drawer                                     400         0.0079607380  1.990...e-05
org-get-limited-outline-regexp                      2401        0.0059861829  2.493...e-06
org-match-string-no-properties                      1200        0.0031827320  2.652...e-06
org-looking-at-p                                    2399        0.0027856489  1.161...e-06
org-list-get-tag                                    400         0.0024748909  6.187...e-06
org-string-match-p                                  1199        0.0018854590  1.572...e-06
org-cycle-show-empty-lines                          2           0.0009863279  0.0004931639
org-cycle                                           1           0.000876598   0.000876598
org-cycle-internal-global                           1           0.000782872   0.000782872
org-list-get-nth                                    400         0.0007689499  1.922375e-06
org-set-regexps-and-options                         1           0.000670828   0.000670828
org-add-link-type                                   8           0.000492713   6.158...e-05
org-make-link-regexps                               8           0.0003960509  4.950...e-05
org-macro-initialize-templates                      1           0.000391607   0.000391607
org-set-visibility-according-to-property            1           0.000324637   0.000324637
org-babel-hide-all-hashes                           1           0.000311911   0.000311911
org-macro--collect-macros                           1           0.000308412   0.000308412
org-overview                                        1           0.000243215   0.000243215
org-update-radio-target-regexp                      1           0.000196982   0.000196982
org-set-regexps-and-options-for-tags                1           0.000194546   0.000194546
org-all-targets                                     1           0.000181915   0.000181915
org-install-agenda-files-menu                       1           0.000125493   0.000125493
org-set-local                                       45          8.570...e-05  1.904...e-06
org-unlogged-message                                1           5.6948e-05    5.6948e-05
org-add-hook                                        5           3.2122e-05    6.424...e-06
org-setup-comments-handling                         1           2.8608e-05    2.8608e-05
org-find-invisible-foreground                       1           2.8233e-05    2.8233e-05
org-set-font-lock-defaults                          1           2.7707e-05    2.7707e-05
org-cycle-hide-archived-subtrees                    2           2.2004e-05    1.1002e-05
org-outline-level                                   2           1.9321e-05    9.6605e-06
org-cycle-item-indentation                          1           1.5876e-05    1.5876e-05
org-assign-fast-keys                                1           1.2067e-05    1.2067e-05
org-at-item-p                                       1           1.1713e-05    1.1713e-05
org-babel-hide-result-toggle-maybe                  1           1.1713e-05    1.1713e-05
org-hide-archived-subtrees                          1           1.17e-05      1.17e-05
org-hide-block-toggle-maybe                         1           1.1425e-05    1.1425e-05
org-make-options-regexp                             2           9.234...e-06  4.617...e-06
org-compute-latex-and-related-regexp                1           8.743e-06     8.743e-06
org-extract-log-state-settings                      2           8.524e-06     4.262e-06
org-at-table-p                                      2           7.683e-06     3.8415e-06
org-back-to-heading                                 2           7.213e-06     3.6065e-06
org-item-re                                         3           6.761e-06     2.253...e-06
org-cycle-level                                     1           6.732e-06     6.732e-06
org-agenda-files                                    1           4.561e-06     4.561e-06
org-uniquify                                        1           3.837e-06     3.837e-06
org-defvaralias                                     1           2.939e-06     2.939e-06
org-point-at-end-of-empty-headline                  1           2.255e-06     2.255e-06
org-optimize-window-after-visibility-change         1           2.025e-06     2.025e-06
org-delete-all                                      1           1.566e-06     1.566e-06
org-restart-font-lock                               1           1.493e-06     1.493e-06
org-babel-result-hide-spec                          1           1.394e-06     1.394e-06
org-babel-header-arg-expand                         1           1.223e-06     1.223e-06
org-cycle-hide-inline-tasks                         1           1.215e-06     1.215e-06
org-last                                            1           8.82e-07      8.82e-07
org-make-target-link-regexp                         1           8.18e-07      8.18e-07
org-src-native-tab-command-maybe                    1           7.89e-07      7.89e-07

But I don't know what happens behind the scenes

-- 
Nico.

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

* Re: Opening an Org file slowed down
  2013-11-27  9:24               ` Michael Brand
  2013-11-27 11:27                 ` Nicolas Richard
@ 2013-11-27 18:13                 ` Achim Gratz
  2013-11-27 19:44                   ` Michael Brand
  1 sibling, 1 reply; 24+ messages in thread
From: Achim Gratz @ 2013-11-27 18:13 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand writes:
> 2) choice:
>    - for quadratic do: M-x org-mode
>    - for linear do: M-x org-version

You have a botched installation.  Make sure that the autoloads are
current, that the Org install directory comes first in load-path and
that you require org-loaddefs before anything else in your startup
sequence that possibly touches anything Org-related.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

* Re: Opening an Org file slowed down
  2013-11-27 18:13                 ` Achim Gratz
@ 2013-11-27 19:44                   ` Michael Brand
  2013-11-27 20:05                     ` Achim Gratz
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Brand @ 2013-11-27 19:44 UTC (permalink / raw)
  To: Achim Gratz; +Cc: Org Mode

Hi Achim

Thank you for looking into this.

On Wed, Nov 27, 2013 at 7:13 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Michael Brand writes:
>> 2) choice:
>>    - for quadratic do: M-x org-mode
>>    - for linear do: M-x org-version
>
> You have a botched installation.  Make sure that the autoloads
> are current,

I always do "make cleanall uncompiled". Is this correct?

> that the Org install directory comes first in load-path

I checked with C-h v load-path and my "/git/org-mode/lisp" is the very
first.

> and that you require org-loaddefs before anything else in your
> startup sequence that possibly touches anything Org-related.

Before I tried without the --eval, but I can reproduce quadratic with
the following too:

/[...]/Emacs -Q -L /git/org-mode/lisp --eval '(require (quote org-loaddefs))'

Now I tried "make cleanall compile" the first time and then I can not
reproduce anymore until I go back to "make cleanall uncompiled". Did
you try to reproduce with my recipe and uncompiled?

Michael

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

* Re: Opening an Org file slowed down
  2013-11-27 19:44                   ` Michael Brand
@ 2013-11-27 20:05                     ` Achim Gratz
  2013-11-27 20:34                       ` Michael Brand
  0 siblings, 1 reply; 24+ messages in thread
From: Achim Gratz @ 2013-11-27 20:05 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand writes:
> I always do "make cleanall uncompiled". Is this correct?

I don't recommend it, but it should work if you're using a non-buggy
Emacs (i.e. not Emacs 23, which never ignores site-lisp).

> Before I tried without the --eval, but I can reproduce quadratic with
> the following too:
>
> /[...]/Emacs -Q -L /git/org-mode/lisp --eval '(require (quote org-loaddefs))'

Then you pull in something via an old autoload that points to a file
that doesn't exist anymore in newer Org.  Also, if Emacs (with a capital
E) isn't a typo, you might want to check it isn't actually a script that
doesn't feed through all switches.

> Now I tried "make cleanall compile" the first time and then I can not
> reproduce anymore until I go back to "make cleanall uncompiled". Did
> you try to reproduce with my recipe and uncompiled?

No.  But you can try this:

/[...]/Emacs -Q -L /git/org-mode/lisp \
  -l ../testing/org-batch-test-init.el -l org-loaddefs


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: Opening an Org file slowed down
  2013-11-27 20:05                     ` Achim Gratz
@ 2013-11-27 20:34                       ` Michael Brand
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-27 20:34 UTC (permalink / raw)
  To: Achim Gratz; +Cc: Org Mode

Hi Achim

On Wed, Nov 27, 2013 at 9:05 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Michael Brand writes:
>> I always do "make cleanall uncompiled". Is this correct?
>
> I don't recommend it, but it should work if you're using a non-buggy
> Emacs (i.e. not Emacs 23, which never ignores site-lisp).

Not recommend which part? Did you mean to recommend compiled and not
recommend uncompiled??

> Also, if Emacs (with a capital E) isn't a typo

No, it's the OS X specific Mach-O executable, built with --with-ns
and make install.

> But you can try this:
>
> /[...]/Emacs -Q -L /git/org-mode/lisp \
>   -l ../testing/org-batch-test-init.el -l org-loaddefs

Uncompiled and then the rest of my recipe? Still quadratic.

Michael

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

* Re: Opening an Org file slowed down
  2013-11-27 13:35                   ` Michael Brand
  2013-11-27 17:10                     ` Nicolas Richard
@ 2013-11-27 22:06                     ` Achim Gratz
  2013-11-28  9:29                       ` Nicolas Richard
  2013-11-28 17:37                       ` Michael Brand
  1 sibling, 2 replies; 24+ messages in thread
From: Achim Gratz @ 2013-11-27 22:06 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand writes:
> It shows a difference, see attachements. It looks like but it was not
> me loosing some first lines when doing this, I cross-checked :-).

I've had a brief look at this.  It seems that some of the differences
are due to elp instrumenting a much larger range of functions when
org-mode has already initialized vs. when only org-version had been
called.  Another difference is that when org-mode gets initialized
before, org-startup-folded is true, which introduces another slight
difference.

lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs 400.org
3.748u 0.096s 0:04.22 90.7%
lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs 800.org
13.880u 0.068s 0:14.47 96.3%
lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-version 400.org
3.764u 0.072s 0:04.08 93.8%
lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-version 800.org
13.956u 0.072s 0:14.51 96.6%
lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-mode 400.org
OVERVIEW
3.736u 0.092s 0:04.16 91.8%
lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-mode 800.org
OVERVIEW
13.872u 0.056s 0:14.51 95.9%

Once that is out of the equation, there isn't any difference to speak
of.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: Opening an Org file slowed down
  2013-11-27 22:06                     ` Achim Gratz
@ 2013-11-28  9:29                       ` Nicolas Richard
  2013-11-28 17:37                       ` Michael Brand
  1 sibling, 0 replies; 24+ messages in thread
From: Nicolas Richard @ 2013-11-28  9:29 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:
> I've had a brief look at this.  It seems that some of the differences
> are due to elp instrumenting a much larger range of functions when
> org-mode has already initialized vs. when only org-version had been
> called.

> Once that is out of the equation, there isn't any difference to speak
> of.

I can confirm that is the same for me. So the difference was just elp
doing its work on a larger codebase ? Great.

-- 
Nico.

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

* Re: Opening an Org file slowed down
  2013-11-27 22:06                     ` Achim Gratz
  2013-11-28  9:29                       ` Nicolas Richard
@ 2013-11-28 17:37                       ` Michael Brand
  1 sibling, 0 replies; 24+ messages in thread
From: Michael Brand @ 2013-11-28 17:37 UTC (permalink / raw)
  To: Achim Gratz; +Cc: Org Mode

Hi Achim

On Wed, Nov 27, 2013 at 11:06 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> I've had a brief look at this.  It seems that some of the differences
> are due to elp instrumenting a much larger range of functions when
> org-mode has already initialized vs. when only org-version had been
> called.

Thank you for pointing this out. So I judged wrongly before when the
roughly squared call counters were missing due to the sometimes
incompletely instrumented Org. Sorry, I correct myself below.

> Another difference is that when org-mode gets initialized
> before, org-startup-folded is true, which introduces another slight
> difference.
>
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs 400.org
> 3.748u 0.096s 0:04.22 90.7%
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs 800.org
> 13.880u 0.068s 0:14.47 96.3%
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-version 400.org
> 3.764u 0.072s 0:04.08 93.8%
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-version 800.org
> 13.956u 0.072s 0:14.51 96.6%
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-mode 400.org
> OVERVIEW
> 3.736u 0.092s 0:04.16 91.8%
> lisp/org-mode> time emacs --batch -Q -L lisp -l testing/org-batch-test-init.el -l org-loaddefs -f org-mode 800.org
> OVERVIEW
> 13.872u 0.056s 0:14.51 95.9%
>
> Once that is out of the equation, there isn't any difference to speak
> of.

I can confirm: When I re-evaluate, now without elp and by comparing
400.org with 800.org: org-mode and org-version in step #2 of my recipe
are the same, both quadratic. Also "make uncompiled" and "make
compile" are the same, both quadratic.

This means that I can still not get the linear relation expected by
Nicolas Goaziou between the number of elements in an entry and
the processing time.

Michael

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

end of thread, other threads:[~2013-11-28 17:37 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 16:41 Opening an Org file slowed down Michael Brand
2013-11-11 17:02 ` Bastien
2013-11-24 16:36   ` Nicolas Goaziou
2013-11-22 14:57 ` Michael Brand
2013-11-23 10:52   ` Nicolas Goaziou
2013-11-24 13:49     ` Michael Brand
2013-11-24 16:25       ` Nicolas Goaziou
2013-11-25 18:45         ` Michael Brand
2013-11-26 17:28     ` Nicolas Goaziou
2013-11-26 19:53       ` Michael Brand
2013-11-26 20:09         ` Nicolas Goaziou
2013-11-26 20:50           ` Michael Brand
2013-11-26 22:19             ` Nicolas Goaziou
2013-11-27  9:24               ` Michael Brand
2013-11-27 11:27                 ` Nicolas Richard
2013-11-27 13:35                   ` Michael Brand
2013-11-27 17:10                     ` Nicolas Richard
2013-11-27 22:06                     ` Achim Gratz
2013-11-28  9:29                       ` Nicolas Richard
2013-11-28 17:37                       ` Michael Brand
2013-11-27 18:13                 ` Achim Gratz
2013-11-27 19:44                   ` Michael Brand
2013-11-27 20:05                     ` Achim Gratz
2013-11-27 20:34                       ` Michael Brand

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