Re: [O] Opening an Org file slowed down

2013-11-28 Thread Michael Brand
Hi Achim On Wed, Nov 27, 2013 at 11:06 PM, Achim Gratz 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

Re: [O] Opening an Org file slowed down

2013-11-28 Thread Nicolas Richard
Achim Gratz 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 diff

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Achim Gratz
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

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Michael Brand
Hi Achim On Wed, Nov 27, 2013 at 9:05 PM, Achim Gratz 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 whic

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Achim Gratz
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 t

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Michael Brand
Hi Achim Thank you for looking into this. On Wed, Nov 27, 2013 at 7:13 PM, Achim Gratz 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 a

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Achim Gratz
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

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Nicolas Richard
Michael Brand 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:

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Michael Brand
Hi Nico On Wed, Nov 27, 2013 at 12:27 PM, Nicolas Richard 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 b

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Nicolas Richard
Hi Michael, Michael Brand 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. -- N

Re: [O] Opening an Org file slowed down

2013-11-27 Thread Michael Brand
Hi Nicolas On Tue, Nov 26, 2013 at 11:19 PM, Nicolas Goaziou 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 wi

Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
Hello, Michael Brand 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-mode1

Re: [O] Opening an Org file slowed down

2013-11-26 Thread Michael Brand
Hi Nicolas On Tue, Nov 26, 2013 at 9:09 PM, Nicolas Goaziou 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: or

Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
Hello, Michael Brand 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.45861

Re: [O] Opening an Org file slowed down

2013-11-26 Thread Michael Brand
Hi Nicolas On Tue, Nov 26, 2013 at 6:28 PM, Nicolas Goaziou 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

Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
> 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 bet

Re: [O] Opening an Org file slowed down

2013-11-25 Thread Michael Brand
Hi Nicolas On Sun, Nov 24, 2013 at 5:25 PM, Nicolas Goaziou 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.

Re: [O] Opening an Org file slowed down

2013-11-24 Thread Nicolas Goaziou
Hello, Bastien 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

Re: [O] Opening an Org file slowed down

2013-11-24 Thread Nicolas Goaziou
Hello, Michael Brand 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 unde

Re: [O] Opening an Org file slowed down

2013-11-24 Thread Michael Brand
Hi Nicolas On Sat, Nov 23, 2013 at 11:52 AM, Nicolas Goaziou 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 /a

Re: [O] Opening an Org file slowed down

2013-11-23 Thread Nicolas Goaziou
Hello, Michael Brand writes: > On Mon, Nov 11, 2013 at 5:41 PM, Michael Brand > 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'

Re: [O] Opening an Org file slowed down

2013-11-22 Thread Michael Brand
Hi Nicolas On Mon, Nov 11, 2013 at 5:41 PM, Michael Brand 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:'

Re: [O] Opening an Org file slowed down

2013-11-11 Thread Bastien
Hi Michael, Michael Brand writes: > release_8.2.1-162-gb392750 > > commit b3927501081b1dab15540591d55f016ed4f9f948 > Author: Nicolas Goaziou > 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

[O] Opening an Org file slowed down

2013-11-11 Thread Michael Brand
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-