[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Opening an Org file slowed down
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Opening an Org file slowed down |
Date: |
Tue, 26 Nov 2013 18:28:44 +0100 |
> 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
- [O] Opening an Org file slowed down, Michael Brand, 2013/11/11
- Re: [O] Opening an Org file slowed down, Bastien, 2013/11/11
- Re: [O] Opening an Org file slowed down, Michael Brand, 2013/11/22
- Re: [O] Opening an Org file slowed down,
Nicolas Goaziou <=
- Re: [O] Opening an Org file slowed down, Michael Brand, 2013/11/26
- Re: [O] Opening an Org file slowed down, Nicolas Goaziou, 2013/11/26
- Re: [O] Opening an Org file slowed down, Michael Brand, 2013/11/26
- Re: [O] Opening an Org file slowed down, Nicolas Goaziou, 2013/11/26
- Re: [O] Opening an Org file slowed down, Michael Brand, 2013/11/27
- Re: [O] Opening an Org file slowed down, Nicolas Richard, 2013/11/27
- Re: [O] Opening an Org file slowed down, Michael Brand, 2013/11/27
- Re: [O] Opening an Org file slowed down, Nicolas Richard, 2013/11/27
- Re: [O] Opening an Org file slowed down, Achim Gratz, 2013/11/27
- Re: [O] Opening an Org file slowed down, Nicolas Richard, 2013/11/28