all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Things got very slow: profiler output
@ 2024-02-29  5:13 William Denton
  2024-02-29  9:21 ` Bruno Barbier
       [not found] ` <notmuch-sha1-998a6a574db756b51dbdd759ff59b5174d99c7f1>
  0 siblings, 2 replies; 30+ messages in thread
From: William Denton @ 2024-02-29  5:13 UTC (permalink / raw)
  To: Emacs Org mode mailing list

I rebuilt Org and Emacs from the development trees and something is wrong, because some Org files I use regularly have become incredibly slow to use.  I rarely use the profiler and don't know what to make of what it says, but I opened a file and ran it while I moved around and expanded and collapsed some headings for a minute or so.  (It was so slow that it took me a minute to do what would usually take me a few seconds.)  I'll paste the results below.  Does that say anything useful?  There is a little LaTeX in the file but not much.

Any help on interpreting this would be welcome.  I can try reverting to an earlier Git commit tomorrow.

Bill

     Samples    %   Function
       73203  70% - redisplay_internal (C function)
       71496  68%  - jit-lock-function
       71488  68%   - jit-lock-fontify-now
       71472  68%    - jit-lock--run-functions
       71472  68%     - #<compiled 0x1baf5fbd9c5fbb3f>
       71472  68%      - font-lock-fontify-region
       71468  68%       - font-lock-default-fontify-region
       71436  68%        - font-lock-fontify-keywords-region
       71124  68%         - org-do-latex-and-related
       71124  68%            re-search-forward
         228   0%         + org-activate-folds
          16   0%         + org-fontify-meta-lines-and-blocks
          12   0%         + org-activate-footnote-links
           8   0%           org-activate-dates
           8   0%         + org-activate-links
           4   0%           org-do-emphasis-faces
           4   0%           org-fontify-drawers
           4   0%           org-raise-scripts
          28   0%        + font-lock-unfontify-region
           4   0%        + font-lock-extend-region-wholelines
           4   0%      text-property-any
       30951  29% + command-execute
          ...


--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada


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

* Re: Things got very slow: profiler output
  2024-02-29  5:13 Things got very slow: profiler output William Denton
@ 2024-02-29  9:21 ` Bruno Barbier
  2024-02-29  9:28   ` Ihor Radchenko
       [not found] ` <notmuch-sha1-998a6a574db756b51dbdd759ff59b5174d99c7f1>
  1 sibling, 1 reply; 30+ messages in thread
From: Bruno Barbier @ 2024-02-29  9:21 UTC (permalink / raw)
  To: William Denton, Emacs Org mode mailing list


Hi William,

William Denton <william@williamdenton.org> writes:

> I rebuilt Org and Emacs from the development trees and something is wrong, because some Org files I use regularly have become incredibly slow to use.  I rarely use the profiler and don't know what to make of what it says, but I opened a file and ran it while I moved around and expanded and collapsed some headings for a minute or so.  (It was so slow that it took me a minute to do what would usually take me a few seconds.)  I'll paste the results below.  Does that say anything useful?  There is a little LaTeX in the file but not much.
>
> Any help on interpreting this would be welcome.  I can try reverting to an earlier Git commit tomorrow.
>
> Bill
>
>      Samples    %   Function
>        73203  70% - redisplay_internal (C function)
>        71496  68%  - jit-lock-function
>        71488  68%   - jit-lock-fontify-now
>        71472  68%    - jit-lock--run-functions
>        71472  68%     - #<compiled 0x1baf5fbd9c5fbb3f>
>        71472  68%      - font-lock-fontify-region
>        71468  68%       - font-lock-default-fontify-region
>        71436  68%        - font-lock-fontify-keywords-region
>        71124  68%         - org-do-latex-and-related
>        71124  68%            re-search-forward
>          228   0%         + org-activate-folds
>           16   0%         + org-fontify-meta-lines-and-blocks
>           12   0%         + org-activate-footnote-links
>            8   0%           org-activate-dates
>            8   0%         + org-activate-links
>            4   0%           org-do-emphasis-faces
>            4   0%           org-fontify-drawers
>            4   0%           org-raise-scripts
>           28   0%        + font-lock-unfontify-region
>            4   0%        + font-lock-extend-region-wholelines
>            4   0%      text-property-any
>        30951  29% + command-execute
>           ...

Did you customize org-latex-and-related-regexp ?  Is it still slow if you set
this to nil (which is apparently the default value) ?

If not, telling which version of Org, that you were using before, might help.


Bruno


>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
> Toronto, Canada


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

* Re: Things got very slow: profiler output
       [not found] ` <notmuch-sha1-998a6a574db756b51dbdd759ff59b5174d99c7f1>
@ 2024-02-29  9:25   ` Bruno Barbier
  2024-03-07 16:12     ` William Denton
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Barbier @ 2024-02-29  9:25 UTC (permalink / raw)
  To: William Denton, Emacs Org mode mailing list

Bruno Barbier <brubar.cs@gmail.com> writes:

> Hi William,
>
> William Denton <william@williamdenton.org> writes:
>
>> I rebuilt Org and Emacs from the development trees and something is wrong, because some Org files I use regularly have become incredibly slow to use.  I rarely use the profiler and don't know what to make of what it says, but I opened a file and ran it while I moved around and expanded and collapsed some headings for a minute or so.  (It was so slow that it took me a minute to do what would usually take me a few seconds.)  I'll paste the results below.  Does that say anything useful?  There is a little LaTeX in the file but not much.
>>
>> Any help on interpreting this would be welcome.  I can try reverting to an earlier Git commit tomorrow.
>>
>> Bill
>>
>>      Samples    %   Function
>>        73203  70% - redisplay_internal (C function)
>>        71496  68%  - jit-lock-function
>>        71488  68%   - jit-lock-fontify-now
>>        71472  68%    - jit-lock--run-functions
>>        71472  68%     - #<compiled 0x1baf5fbd9c5fbb3f>
>>        71472  68%      - font-lock-fontify-region
>>        71468  68%       - font-lock-default-fontify-region
>>        71436  68%        - font-lock-fontify-keywords-region
>>        71124  68%         - org-do-latex-and-related
>>        71124  68%            re-search-forward
>>          228   0%         + org-activate-folds
>>           16   0%         + org-fontify-meta-lines-and-blocks
>>           12   0%         + org-activate-footnote-links
>>            8   0%           org-activate-dates
>>            8   0%         + org-activate-links
>>            4   0%           org-do-emphasis-faces
>>            4   0%           org-fontify-drawers
>>            4   0%           org-raise-scripts
>>           28   0%        + font-lock-unfontify-region
>>            4   0%        + font-lock-extend-region-wholelines
>>            4   0%      text-property-any
>>        30951  29% + command-execute
>>           ...
>
> Did you customize org-latex-and-related-regexp ?  Is it still slow if you set
> this to nil (which is apparently the default value) ?
>
> If not, telling which version of Org, that you were using before, might help.

Oops, sorry, the customization option is:

    org-highlight-latex-and-related
    
(the other value is computed by Org)

You may try to change that option org-highlight-latex-and-related to see
if it helps.


Bruno

>
> Bruno
>
>
>>
>> --
>> William Denton
>> https://www.miskatonic.org/
>> Librarian, artist and licensed private investigator.
>> Toronto, Canada


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

* Re: Things got very slow: profiler output
  2024-02-29  9:21 ` Bruno Barbier
@ 2024-02-29  9:28   ` Ihor Radchenko
  0 siblings, 0 replies; 30+ messages in thread
From: Ihor Radchenko @ 2024-02-29  9:28 UTC (permalink / raw)
  To: Bruno Barbier; +Cc: William Denton, Emacs Org mode mailing list

Bruno Barbier <brubar.cs@gmail.com> writes:

> Did you customize org-latex-and-related-regexp ?  Is it still slow if you set
> this to nil (which is apparently the default value) ?

org-latex-and-related-regexp is not a customization. It is an internal
variable. The relevant customization is org-highlight-latex-and-related.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-02-29  9:25   ` Bruno Barbier
@ 2024-03-07 16:12     ` William Denton
  2024-03-07 17:42       ` Bruno Barbier
  2024-03-09 19:27       ` William Denton
  0 siblings, 2 replies; 30+ messages in thread
From: William Denton @ 2024-03-07 16:12 UTC (permalink / raw)
  To: Bruno Barbier; +Cc: Emacs Org mode mailing list

On Thursday, February 29th, 2024 at 04:25, Bruno Barbier <brubar.cs@gmail.com> wrote:

> Oops, sorry, the customization option is:
> 
> org-highlight-latex-and-related
> 
> (the other value is computed by Org)
> 
> You may try to change that option org-highlight-latex-and-related to see
> if it helps.

I checked:

|  Its value is (latex)
|  Original value was nil

I didn't have a chance to dig back into this but now I see other people are reporting slowness and I hope this helps.

I recompiled Emacs and Org last night and closed all my buffers except for two medium-sized ones, neither with any LaTeX in them.  I restarted and spent a minute or two with one buffer, closing and expanding headings, and just moving around without typing, and it quickly slowed down.  When I did do a bit of typing it was very laggy (and will only get worse). The profiler said this:

       44032  66% - redisplay_internal (C function)
       42619  63%  - jit-lock-function
       42603  63%   - jit-lock-fontify-now
       42551  63%    - jit-lock--run-functions
       42547  63%     - run-hook-wrapped
       42543  63%      - #<compiled 0x1badbc188025c93f>
       42535  63%       - font-lock-fontify-region
       42531  63%        - font-lock-default-fontify-region
       41987  62%         - font-lock-fontify-keywords-region
       40255  60%          - org-do-latex-and-related
       40243  60%             re-search-forward
          12   0%             org-string-nw-p
        1224   1%          + org-activate-folds
         156   0%            re-search-forward
         ...       

I'm happy to try anything else ...

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada





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

* Re: Things got very slow: profiler output
  2024-03-07 16:12     ` William Denton
@ 2024-03-07 17:42       ` Bruno Barbier
  2024-03-09 19:27       ` William Denton
  1 sibling, 0 replies; 30+ messages in thread
From: Bruno Barbier @ 2024-03-07 17:42 UTC (permalink / raw)
  To: William Denton; +Cc: Emacs Org mode mailing list

William Denton <william@williamdenton.org> writes:

> On Thursday, February 29th, 2024 at 04:25, Bruno Barbier <brubar.cs@gmail.com> wrote:
>
[...]
> I checked:
>
> |  Its value is (latex)
> |  Original value was nil
>
> I didn't have a chance to dig back into this but now I see other people are reporting slowness and I hope this helps.
>
[...]

Is it slow too when using the default config (emacs -Q and no customization)
(see https://orgmode.org/org.html#Feedback) ?


Bruno


> I'm happy to try anything else ...
>
> Bill
>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
> Toronto, Canada


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

* Re: Things got very slow: profiler output
  2024-03-07 16:12     ` William Denton
  2024-03-07 17:42       ` Bruno Barbier
@ 2024-03-09 19:27       ` William Denton
  2024-03-12 12:43         ` Ihor Radchenko
  1 sibling, 1 reply; 30+ messages in thread
From: William Denton @ 2024-03-09 19:27 UTC (permalink / raw)
  To: Emacs Org mode mailing list

On Thursday, March 7th, 2024 at 11:12, William Denton <william@williamdenton.org> wrote:

> I recompiled Emacs and Org last night and closed all my buffers except for two medium-sized ones, neither with any LaTeX in them. I restarted and spent a minute or two with one buffer, closing and expanding headings, and just moving around without typing, and it quickly slowed down. When I did do a bit of typing it was very laggy (and will only get worse). The profiler said this:
> 
> 44032 66% - redisplay_internal (C function)
> 42619 63% - jit-lock-function
> 42603 63% - jit-lock-fontify-now
> 42551 63% - jit-lock--run-functions
> 42547 63% - run-hook-wrapped
> 42543 63% - #<compiled 0x1badbc188025c93f>
> 
> 42535 63% - font-lock-fontify-region
> 42531 63% - font-lock-default-fontify-region
> 41987 62% - font-lock-fontify-keywords-region
> 40255 60% - org-do-latex-and-related
> 40243 60% re-search-forward
> 12 0% org-string-nw-p
> 1224 1% + org-activate-folds
> 156 0% re-search-forward
> ...
> 
> I'm happy to try anything else ...

I spent a while with git bisect this afternoon and the problem (for me) started here:

commit 5d186b499dde97f59a91dc11f4c4a15113d29f4d
Author: Ihor Radchenko <yantar92@posteo.net>
Date:   Sun Feb 25 11:42:44 2024 +0300

    org-fold: Refactor fontifying newlines after folds

That seems to fit with some of what the profiling showed, in that it's about font-locking, though why LaTeX is mentioned is beyond me.  When I was going through the bisect process I wasn't testing on files with LaTeX, I was expanding and folding some I regularly use that have some code blocks and tables with a few hundred lines.

My Lisp isn't good enough to see why this commit might have changed behaviour.  A couple of people had slowness caused by a spell-checker that was easily fixed ... has no one else seen a problem dating back to late February?  Ihor, does this suggest anything to you?  Is there anything else I could try?

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada




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

* Re: Things got very slow: profiler output
  2024-03-09 19:27       ` William Denton
@ 2024-03-12 12:43         ` Ihor Radchenko
  2024-03-13 23:19           ` Bruno Cardoso
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-12 12:43 UTC (permalink / raw)
  To: William Denton; +Cc: Emacs Org mode mailing list

William Denton <william@williamdenton.org> writes:

>> 40255 60% - org-do-latex-and-related
>> 40243 60% re-search-forward
> ...
> I spent a while with git bisect this afternoon and the problem (for me) started here:
>
> commit 5d186b499dde97f59a91dc11f4c4a15113d29f4d
> Author: Ihor Radchenko <yantar92@posteo.net>
> Date:   Sun Feb 25 11:42:44 2024 +0300
>
>     org-fold: Refactor fontifying newlines after folds
>
> That seems to fit with some of what the profiling showed, in that it's
> about font-locking, though why LaTeX is mentioned is beyond me. When I
> was going through the bisect process I wasn't testing on files with
> LaTeX, I was expanding and folding some I regularly use that have some
> code blocks and tables with a few hundred lines.

Profiler data does not make sense here.
In any case, I tried to make fontifying newlines after folds slightly
faster on the latest main:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c9b655f27

If you are lucky, it should help.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-12 12:43         ` Ihor Radchenko
@ 2024-03-13 23:19           ` Bruno Cardoso
  2024-03-14  1:17             ` William Denton
  2024-03-14 21:23             ` Ihor Radchenko
  0 siblings, 2 replies; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-13 23:19 UTC (permalink / raw)
  To: Ihor Radchenko, William Denton; +Cc: Emacs Org mode mailing list


On 2024-03-12, 12:43 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:

>
> Profiler data does not make sense here.
> In any case, I tried to make fontifying newlines after folds slightly
> faster on the latest main:
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c9b655f27
>
> If you are lucky, it should help.
>

Hello,

For me this improved the situation a bit, but I still get significant slow-downs as before.

I don't know if it is related, but if I set a property (C-c C-x p) in a new heading with no drawers, I'm unable to unfold the newly created drawer (TAB over it does nothing), although I am able to fold/unfold other already existent drawers as expected. This also happens in `emacs -Q' (org-version 9.7-pre release_9.6.20-1280-g7653e5).

Besides the profiler, which still blames `org-fold-core--property-symbol-get-create' for the slow-down, is there some debugging configuration I should try out? I tried setting

(setq org-element--cache-self-verify 'backtrace)
(setq org-element--cache-self-verify-frequency 1.0)

but it does not signal any error.


Best,

Bruno.


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

* Re: Things got very slow: profiler output
  2024-03-13 23:19           ` Bruno Cardoso
@ 2024-03-14  1:17             ` William Denton
  2024-03-14  7:34               ` Gerard Vermeulen
  2024-03-14 10:22               ` Bruno Cardoso
  2024-03-14 21:23             ` Ihor Radchenko
  1 sibling, 2 replies; 30+ messages in thread
From: William Denton @ 2024-03-14  1:17 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: Ihor Radchenko, Emacs Org mode mailing list

On Wednesday, March 13th, 2024 at 19:19, Bruno Cardoso <cardoso.bc@gmail.com> wrote:

> For me this improved the situation a bit, but I still get significant slow-downs as before.
> 
> I don't know if it is related, but if I set a property (C-c C-x p) in a new heading with no drawers, I'm unable to unfold the newly created drawer (TAB over it does nothing), although I am able to fold/unfold other already existent drawers as expected. 

I don't have that problem, if I understand your description right, but like you Ihor's tweak didn't get things back to normal for me.  I'm now using Emacs from the development tree and its Org (which doesn't yet have commit 5d186b499dde97f5 from 25 February) and it's back to normal for now.

Could it be something our systems or configurations have in common, Bruno?  My Org configuration is here, if you want to compare:

https://github.com/wdenton/.emacs.d/blob/master/init.org#org

Thanks for looking at this problem, Ihor.  If there's anything else to try, I'll try it.

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada




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

* Re: Things got very slow: profiler output
  2024-03-14  1:17             ` William Denton
@ 2024-03-14  7:34               ` Gerard Vermeulen
  2024-03-14 10:27                 ` Bruno Cardoso
  2024-03-14 10:22               ` Bruno Cardoso
  1 sibling, 1 reply; 30+ messages in thread
From: Gerard Vermeulen @ 2024-03-14  7:34 UTC (permalink / raw)
  To: William Denton; +Cc: Bruno Cardoso, Ihor Radchenko, Emacs Org mode mailing list



On 14.03.2024 02:17, William Denton wrote:
> On Wednesday, March 13th, 2024 at 19:19, Bruno Cardoso
> <cardoso.bc@gmail.com> wrote:
> 
>> For me this improved the situation a bit, but I still get significant 
>> slow-downs as before.
>> 
>> I don't know if it is related, but if I set a property (C-c C-x p) in 
>> a new heading with no drawers, I'm unable to unfold the newly created 
>> drawer (TAB over it does nothing), although I am able to fold/unfold 
>> other already existent drawers as expected.

I see this too and my work-around is calling org-fold-show-all to read 
the
newly created property drawer.

> 
> I don't have that problem, if I understand your description right, but
> like you Ihor's tweak didn't get things back to normal for me.  I'm
> now using Emacs from the development tree and its Org (which doesn't
> yet have commit 5d186b499dde97f5 from 25 February) and it's back to
> normal for now.
> 
I did not notice any of the slow-downs and the output of the cpu 
profiler
looks normal to me.
> 
> Could it be something our systems or configurations have in common,
> Bruno?  My Org configuration is here, if you want to compare:
> 
> https://github.com/wdenton/.emacs.d/blob/master/init.org#org
> 
I am running
GNU Emacs 30.0.50 (build 15, x86_64-apple-darwin20.6.0, NS 
appkit-2202.70 Version 11.7.1 (Build 20G918)) of 2024-03-14
with a yesterday's Org main.

I am using the default theme (light background) and do not do any font 
tweaking.
> 
> Thanks for looking at this problem, Ihor.  If there's anything else to
> try, I'll try it.
> 
Regards -- Gerard



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

* Re: Things got very slow: profiler output
  2024-03-14  1:17             ` William Denton
  2024-03-14  7:34               ` Gerard Vermeulen
@ 2024-03-14 10:22               ` Bruno Cardoso
  1 sibling, 0 replies; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-14 10:22 UTC (permalink / raw)
  To: William Denton; +Cc: Ihor Radchenko, Emacs Org mode mailing list


On 2024-03-14, 01:17 +0000, William Denton <william@williamdenton.org> wrote:

>
> I don't have that problem, if I understand your description right, but like you Ihor's tweak didn't get things back to normal for me.  I'm now using Emacs from the development tree and its Org (which doesn't yet have commit 5d186b499dde97f5 from 25 February) and it's back to normal for now.
>

Hello William,

I haven't tried to revert to it yet, but I guess it was in fact after the commit/date you mentioned when I started noticing this behavior.


> Could it be something our systems or configurations have in common, Bruno?  My Org configuration is here, if you want to compare:
>
> https://github.com/wdenton/.emacs.d/blob/master/init.org#org
>

I looked into your config and couldn't spot anything special we have in common. I have these settings in my config regarding org fold and fontify:

(setq org-fold-catch-invisible-edits     'smart  ;; default is 'smart
      org-fontify-done-headline          t       ;; default is t
      org-fontify-quote-and-verse-blocks t       ;; default is nil
      org-fontify-whole-heading-line     t)      ;; default is nil

However I get the slow-down in a clean init.el with just `(straight-use-package 'org)'.


Best,

Bruno.


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

* Re: Things got very slow: profiler output
  2024-03-14  7:34               ` Gerard Vermeulen
@ 2024-03-14 10:27                 ` Bruno Cardoso
  0 siblings, 0 replies; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-14 10:27 UTC (permalink / raw)
  To: Gerard Vermeulen, William Denton
  Cc: Ihor Radchenko, Emacs Org mode mailing list


On 2024-03-14, 07:34 +0000, Gerard Vermeulen <gerard.vermeulen@posteo.net> wrote:

>
> I see this too and my work-around is calling org-fold-show-all to read 
> the
> newly created property drawer.
>

Hello Gerard,

Yes, this work-around also does work for me. I often do S-TAB to cycle the Org file visibility and then I'm able to fold/unfold the new drawer again.


> I am running
> GNU Emacs 30.0.50 (build 15, x86_64-apple-darwin20.6.0, NS 
> appkit-2202.70 Version 11.7.1 (Build 20G918)) of 2024-03-14
> with a yesterday's Org main.
>
> I am using the default theme (light background) and do not do any font 
> tweaking.

I forgot to mention my Emacs version: GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.40, cairo version 1.18.0). Its the 'emacs-nativecomp' package from Arch repository.


Best,

Bruno.


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

* Re: Things got very slow: profiler output
  2024-03-13 23:19           ` Bruno Cardoso
  2024-03-14  1:17             ` William Denton
@ 2024-03-14 21:23             ` Ihor Radchenko
  2024-03-15  1:09               ` Bruno Cardoso
  1 sibling, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-14 21:23 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

> I don't know if it is related, but if I set a property (C-c C-x p) in a new heading with no drawers, I'm unable to unfold the newly created drawer (TAB over it does nothing), although I am able to fold/unfold other already existent drawers as expected. This also happens in `emacs -Q' (org-version 9.7-pre release_9.6.20-1280-g7653e5).

That's a different bug.
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fb61e83f2

> Besides the profiler, which still blames
> `org-fold-core--property-symbol-get-create' for the slow-down, is
> there some debugging configuration I should try out?

You can try to run
M-: (benchmark-run 10000 (org-fold-core--property-symbol-get-create 'outline nil t)) <RET>
from inside Org mode buffer.

I am getting (0.178426995 0 0.0) as a result - takes almost no CPU time.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-14 21:23             ` Ihor Radchenko
@ 2024-03-15  1:09               ` Bruno Cardoso
  2024-03-15 14:24                 ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-15  1:09 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list


On 2024-03-14, 21:23 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:

>
> That's a different bug.
> Fixed on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fb61e83f2
>
> You can try to run
> M-: (benchmark-run 10000 (org-fold-core--property-symbol-get-create 'outline nil t)) <RET>
> from inside Org mode buffer.
>
> I am getting (0.178426995 0 0.0) as a result - takes almost no CPU time.
>

Thanks Ihor. Indeed I get a similar result from benchmark-run. 



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

* Re: Things got very slow: profiler output
  2024-03-15  1:09               ` Bruno Cardoso
@ 2024-03-15 14:24                 ` Ihor Radchenko
  2024-03-15 16:33                   ` Bruno Cardoso
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-15 14:24 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

>> I am getting (0.178426995 0 0.0) as a result - takes almost no CPU time.
>>
> Thanks Ihor. Indeed I get a similar result from benchmark-run. 

May you share the full profile via M-x profiler-report-write-profile then?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-15 14:24                 ` Ihor Radchenko
@ 2024-03-15 16:33                   ` Bruno Cardoso
  2024-03-15 17:18                     ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-15 16:33 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list

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


On 2024-03-15, 14:24 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> May you share the full profile via M-x profiler-report-write-profile then?

Hi Ihor,

See attached the profiler-report in emacs -Q and Org mode version 9.7-pre (release_9.6.20-1281-gfb61e8).

In a new org file I created some headings, fold/unfold, and did some typing while recording.


[-- Attachment #2: 20240315_profiler_org.txt --]
[-- Type: text/plain, Size: 29681 bytes --]


[profiler-profile "28.1" cpu #s(hash-table size 145 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 908 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b70ddb20b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil] 310 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b70ddb20b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 340 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b70ddb20b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 846 [org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b70ddb20b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 67 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move] 14 [mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move previous-line funcall-interactively] 3 [org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 49 [line-move previous-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 8 [if eval redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil] 6 [org-fontify-drawers font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 41 [previous-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move previous-line funcall-interactively command-execute nil nil nil nil nil nil] 3 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move previous-line funcall-interactively command-execute nil nil nil nil nil] 3 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569183e8f7e1443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil] 367 [org-element--parse-to org-element-at-point org-element-at-point-no-context org-indent-line indent-according-to-mode electric-indent-post-self-insert-function newline org--newline "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil nil] 3 [font-lock-extend-region-wholelines font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b756f3d4143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 6 [org-fold-core-get-folding-spec org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 1 [org-fold-core--property-symbol-get-create org-fold-core-get-region-at-point org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 45 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 17 [org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569180c85dcdb43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 56 [org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569180555a30a43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 58 [org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691806bd2b3343>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 71 [org-element-create org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil] 1 [font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a77aa785443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 93 [mapc org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x156918376eb8a943>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 4 [org-font-lock-add-priority-faces font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x156918447fdc0f43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 10 [font-lock-extend-jit-lock-region-after-change jit-lock-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569180210dd0543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 10 [org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569184d684a4b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 32 [oclosure-interactive-form interactive-form command-execute nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil] 19 [org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 7 [org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691871689d1b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 21 [org-fold-core-next-folding-state-change org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [font-lock-fontify-region "#<compiled -0x15691b7e86b94e43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil] 16 [org-do-emphasis-faces font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569187670be2d43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 50 [jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 28 [org-activate-dates font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b7161811343>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 23 [timer--activate timer-activate-when-idle run-with-idle-timer org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil] 4 [org-element--cache-submit-request org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 [redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 11 [font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691b756f3d4143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 20 [org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 12 [org-activate-tags font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a78883b5343>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 16 [jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil] 31 [org-fontify-macros font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a43135f6243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 7 [org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil] 3 [org-fontify-meta-lines-and-blocks-1 org-fontify-meta-lines-and-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a6431502643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 32 [org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569184d684a4b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 44 [org-fold-core-get-folding-spec-from-alias org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a4bb6c6f643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 11 [org-fontify-meta-lines-and-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a42da814743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 8 [org-do-latex-and-related font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569187352460243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 6 [org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 7 [jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil] 10 [self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 10 [org-activate-links--overlays org-activate-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569184d684a4b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 58 [seq-find org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691862ccbd9743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 13 ["#<compiled -0x10f6ae7033e5fb7d>" apply oclosure-interactive-form interactive-form command-execute nil nil nil nil nil nil nil nil nil nil nil] 2 ["#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 15 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core--fix-folded-region newline org--newline "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil] 9 [font-lock-flush org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569185f6d298143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 28 [org-activate-code font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569185f6d298143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 7 [org-element--cache-sync org-element--cache-submit-request org-element--cache-after-change newline org--newline "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil] 5 [run-at-time run-with-timer blink-cursor--start-timer blink-cursor-start apply timer-event-handler nil nil nil nil nil nil nil nil nil nil] 9 [rx--translate-seq rx--translate-form rx--translate rx-to-string org-element--cache-before-change self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil] 2 [org-element--cache-sync org-element-at-point org-up-heading-safe org-get-outline-path org-eldoc-get-breadcrumb org-eldoc-documentation-function eldoc-documentation-default eldoc--invoke-strategy eldoc-print-current-symbol-info "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>" apply timer-event-handler nil nil nil nil] 5 [org-in-regexp org-at-timestamp-p org-shiftright funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 1 [org-activate-tags font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a1b1c459443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-todo funcall-interactively call-interactively org-shiftright funcall-interactively command-execute nil] 4 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a1d195d4643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-todo funcall-interactively call-interactively org-shiftright funcall-interactively] 9 [apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 3 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>" apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil nil nil] 4 [org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569185f6d298143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 3 [mapc seq-do seq-find org-cite-get-processor org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691bead85fc843>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 3 [apply org-element--property org-element--property org--property-local-values "#<compiled -0x49eca7d3a1ffd3b>" org-element-lineage-map org-entry-get-with-inheritance org-entry-get org-todo funcall-interactively call-interactively org-shiftright funcall-interactively command-execute nil nil] 7 [org-todo funcall-interactively call-interactively org-shiftright funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 3 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_22>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a60a79e9443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-todo funcall-interactively] 4 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-todo funcall-interactively call-interactively org-shiftright funcall-interactively command-execute nil nil nil] 3 [org-fontify-inline-src-blocks-1 org-fontify-inline-src-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691be1686c5b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 10 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691be1686c5b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil nil nil] 11 [font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil nil] 6 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively] 3 [org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a60a79e9443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil] 3 [eldoc-minibuffer-message eldoc--message eldoc-pre-command-refresh-echo-area nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569185f6d298143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-subtree-end-visible-p org-cycle-optimize-window-after-visibility-change run-hook-with-args org-cycle-internal-local org-cycle funcall-interactively command-execute nil nil] 3 [org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p org-subtree-end-visible-p org-cycle-optimize-window-after-visibility-change run-hook-with-args org-cycle-internal-local org-cycle funcall-interactively] 4 [org-do-emphasis-faces font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691be1686c5b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil] 3 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a60a79e9443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil] 3 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691be1686c5b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute] 3 [org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691be1686c5b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute nil nil nil] 3 ["#<compiled 0xabc53e4dc7f7b71>" org-fold-core-next-visibility-change org-fold-previous-visibility-change org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 3 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-fold--reveal-headline-at-point org-fold--reveal-outline-maybe org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil] 2 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-cycle-content org-cycle-internal-global org-cycle org-cycle-global funcall-interactively call-interactively org-shifttab funcall-interactively command-execute nil] 6 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-fold-show-all org-cycle-internal-global org-cycle org-cycle-global funcall-interactively call-interactively org-shifttab funcall-interactively command-execute nil nil nil] 3 [org-activate-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569185f6d298143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 7 [org-fold-core-get-region-at-point org-fold-core--fix-folded-region self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 4 [org-element--parse-to org-element-at-point "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 4 [org-fontify-inline-src-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569166a10fda743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 4 ["#<compiled -0x1569166a32cbce43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil] 6 [org-element--cache-after-change delete-space--internal delete-horizontal-space electric-indent-post-self-insert-function newline org--newline "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil nil nil nil] 2 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569184d684a4b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil] 12 [mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569164f8670fa43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 4 [org-fontify-drawers font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569164e1ef98343>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p blink-matching-open blink-paren-post-self-insert-function self-insert-command "#<compiled 0x124448cc198f42de>" apply org-self-insert-command funcall-interactively] 4 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p blink-matching-open blink-paren-post-self-insert-function self-insert-command "#<compiled 0x124448cc198f42de>" apply] 3 [org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1569184d684a4b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 3 [derived-mode-p font-lock-set-defaults font-lock-fontify-region "#<compiled -0x15691bca7f0d6543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 3 [seq-do seq-find org-cite-get-processor org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x15691a8b0f030443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 3 [org-element-headline-parser org-element--parse-to org-element-at-point org-element-at-point-no-context org-indent-line indent-according-to-mode electric-indent-post-self-insert-function newline org--newline "#<compiled -0x1197896d31e663a6>" apply org-return funcall-interactively command-execute nil nil] 2 [line-move next-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 2 [progn elisp--eval-last-sexp eval-last-sexp funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 4 [Automatic\ GC] 339)) (26100 30365 217480 14000) nil]

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

* Re: Things got very slow: profiler output
  2024-03-15 16:33                   ` Bruno Cardoso
@ 2024-03-15 17:18                     ` Ihor Radchenko
  2024-03-15 17:49                       ` Bruno Cardoso
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-15 17:18 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list


Bruno Cardoso <cardoso.bc@gmail.com> writes:
> See attached the profiler-report in emacs -Q and Org mode version 9.7-pre (release_9.6.20-1281-gfb61e8).
>
> In a new org file I created some headings, fold/unfold, and did some typing while recording.

This does not make sense.
The profiler trace implies
org-activate-folds -> org-fold-core-next-visibility-change ->
org-fold-core-next-folding-state-change ->
org-fold-core--property-symbol-get-create (takes most time)

But your benchmark showed that
`org-fold-core--property-symbol-get-create' cannot take that much
time...

Unless it is called 100k+ times.

May you do the following:

1. (require 'elp)
2. (elp-instrument-function #'org-fold-core--property-symbol-get-create)
3. Do actions in Org file
4. (elp-results)
5. See *ELP Profiling Results*
6. (elp-restore-all)

For me, the result is

Function Name                              Call Count  Elapsed Time  Average Time
org-fold-core--property-symbol-get-create  27361       0.5646422580  2.063...e-05

(the time numbers are not real because instrumenting itself makes
function a lot slower, but we can compare the call count)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-15 17:18                     ` Ihor Radchenko
@ 2024-03-15 17:49                       ` Bruno Cardoso
  2024-03-16  8:56                         ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-15 17:49 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list


On 2024-03-15, 17:18 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:

> Bruno Cardoso <cardoso.bc@gmail.com> writes:
>
> May you do the following:
>
> 1. (require 'elp)
> 2. (elp-instrument-function #'org-fold-core--property-symbol-get-create)
> 3. Do actions in Org file
> 4. (elp-results)
> 5. See *ELP Profiling Results*
> 6. (elp-restore-all)
>
> For me, the result is
>
> Function Name                              Call Count  Elapsed Time  Average Time
> org-fold-core--property-symbol-get-create  27361       0.5646422580  2.063...e-05
>
> (the time numbers are not real because instrumenting itself makes
> function a lot slower, but we can compare the call count)
>

My call count is in fact higher:

org-fold-core--property-symbol-get-create  196278      3.2828460320  1.672...e-05



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

* Re: Things got very slow: profiler output
  2024-03-15 17:49                       ` Bruno Cardoso
@ 2024-03-16  8:56                         ` Ihor Radchenko
  2024-03-16 13:31                           ` Bruno Cardoso
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-16  8:56 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

> My call count is in fact higher:
>
> org-fold-core--property-symbol-get-create  196278      3.2828460320  1.672...e-05

Makes sense.

What if you try the following version of `org-activate-folds'?

(defun org-activate-folds (limit)
  "Arrange trailing newlines after folds to inherit face before the fold."
  (let ((next-unfolded-newline (search-forward "\n" limit 'move)))
    (while (and next-unfolded-newline (org-fold-folded-p) (not (eobp)))
      (goto-char (org-fold-core-next-visibility-change nil limit 'only-folds))
      (setq next-unfolded-newline (search-forward "\n" limit 'move)))
    (when next-unfolded-newline
      (org-with-wide-buffer
       (when (and (> (match-beginning 0) (point-min))
                  (org-fold-folded-p (1- (match-beginning 0)))
                  (not (org-fold-folded-p (1- (match-beginning 0)) 'org-link)))
         (put-text-property
          (match-beginning 0) (match-end 0)
          'face
          (get-text-property
           (org-fold-previous-visibility-change
            (1- (match-beginning 0)))
           'face)))
       t))))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-16  8:56                         ` Ihor Radchenko
@ 2024-03-16 13:31                           ` Bruno Cardoso
  2024-03-16 15:56                             ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-16 13:31 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list

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


On 2024-03-16, 08:56 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:

> Bruno Cardoso <cardoso.bc@gmail.com> writes:
>
> What if you try the following version of `org-activate-folds'?
>
> (defun org-activate-folds (limit)
>   "Arrange trailing newlines after folds to inherit face before the fold."
>   (let ((next-unfolded-newline (search-forward "\n" limit 'move)))
>     (while (and next-unfolded-newline (org-fold-folded-p) (not (eobp)))
>       (goto-char (org-fold-core-next-visibility-change nil limit 'only-folds))
>       (setq next-unfolded-newline (search-forward "\n" limit 'move)))
>     (when next-unfolded-newline
>       (org-with-wide-buffer
>        (when (and (> (match-beginning 0) (point-min))
>                   (org-fold-folded-p (1- (match-beginning 0)))
>                   (not (org-fold-folded-p (1- (match-beginning 0)) 'org-link)))
>          (put-text-property
>           (match-beginning 0) (match-end 0)
>           'face
>           (get-text-property
>            (org-fold-previous-visibility-change
>             (1- (match-beginning 0)))
>            'face)))
>        t))))
>

It makes almost no difference.


[-- Attachment #2: 20240316_profiler-org.txt --]
[-- Type: text/plain, Size: 29848 bytes --]


[profiler-profile "28.1" cpu #s(hash-table size 145 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 736 [line-move previous-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 4 [org-eldoc-documentation-function eldoc-documentation-default eldoc--invoke-strategy eldoc-print-current-symbol-info "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>" apply timer-event-handler nil nil nil nil nil nil nil nil nil] 2 [org-fold-core--property-symbol-get-create org-fold-core-get-region-at-point org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 63 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b96fbec66943>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil] 332 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-folded-p and if save-restriction save-excursion progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b95fd7835d43>" jit-lock--run-functions] 322 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b964bcd96b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil] 235 [jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil] 27 [org-at-table-p "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 5 [org-fold-core--check-spec mapc org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b9323ef7e343>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil] 8 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil] 21 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b93502f4f943>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 225 [font-lock-extend-jit-lock-region-after-change jit-lock-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 4 [font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b933758ed543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 105 [org-fold-check-before-invisible-edit-maybe apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 1 [org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b92b4afb7d43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 17 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b922b564dd43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil] 171 ["#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 24 [org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b9205f32af43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 6 [org-element--cache-find org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 5 [org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b9268d93cb43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 28 [redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 12 [org-footnote-next-reference-or-definition org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc311227f743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 61 [jit-lock-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 4 [org-fold-core-get-folding-spec org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 4 [font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2ea0da8f43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 20 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 21 [org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 9 [org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 2 [org--newline "#<subr org-return>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 4 [org-element--cache-submit-request org-element--cache-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 3 [org-do-emphasis-faces font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc3dd16f4943>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 23 [org-fontify-inline-src-blocks-1 org-fontify-inline-src-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf70b6761043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 18 [org-element--cache-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 6 [org-element--parse-to org-element-at-point "#<subr org-return>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 3 [org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc79f3bf5043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 17 [org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf73ced89043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 42 [clear-minibuffer-message nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [mapc org-fold-core-next-folding-state-change org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 5 [org-activate-links--overlays org-activate-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc57c9ad3043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 52 [org-fold-core-get-folding-spec org-fold-folded-p and if save-restriction save-excursion progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc630dc91043>" jit-lock--run-functions jit-lock-fontify-now] 11 [jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 4 [org-fold-core-get-folding-spec-from-alias org-fold-core--check-spec mapc org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bfd613f2cd43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil] 3 [newline org--newline "#<subr org-return>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 8 [org-fold-folded-p and if save-restriction save-excursion progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf1aac005d43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function] 10 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-folded-p org-fold-core-next-visibility-change goto-char while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf1f2443d243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\)] 4 [org-cycle-optimize-window-after-visibility-change run-hook-with-args org-cycle-internal-local org-cycle funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 6 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf1f2443d243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function org-subtree-end-visible-p org-cycle-optimize-window-after-visibility-change run-hook-with-args org-cycle-internal-local org-cycle funcall-interactively command-execute nil nil nil] 7 [org-fontify-meta-lines-and-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf1f2443d243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 9 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2bf1e4f243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move] 20 [line-move next-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 11 [run-at-time run-with-timer blink-cursor--start-timer blink-cursor-start apply timer-event-handler nil nil nil nil nil nil nil nil nil nil] 2 [org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf1f2443d243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute nil nil nil nil] 3 [org-fontify-meta-lines-and-blocks font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2bf1e4f243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute nil nil nil nil] 3 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2a8da6fb43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move] 8 [org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2a8da6fb43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute nil nil nil] 3 [org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2e0dd26243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute] 3 [org-element--cache-find org-element--parse-to org-element-at-point org-eldoc-get-src-lang org-eldoc-documentation-function eldoc-documentation-default eldoc--invoke-strategy eldoc-print-current-symbol-info "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>" apply timer-event-handler nil nil nil nil nil] 3 [apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 1 [org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf2dbeab5143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil] 4 [org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change delete-and-extract-region "#<compiled 0x1532240bfe9cdc71>" apply "#<compiled -0x698526e89acbe2>" buffer-substring--filter org-fold-core--buffer-substring-filter filter-buffer-substring kill-region kill-line funcall-interactively org-kill-line funcall-interactively] 2 ["#<compiled 0x6ad39cfad4f6c6d>" "#<compiled 0x84e099b9d36e0ee>" mapc seq-do seq-find org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bfdfccfc8c43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\)] 4 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bf10499a8743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move previous-line funcall-interactively] 8 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bfdf20e12743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move previous-line funcall-interactively command-execute] 2 [org-do-latex-and-related font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bfdf20e12743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 3 [insert-for-yank yank funcall-interactively call-interactively org-yank-generic org-yank funcall-interactively command-execute nil nil nil nil nil nil nil nil] 1 [line-move-visual line-move previous-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 4 [syntax-ppss show-paren--default show-paren-function apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil] 1 [org-do-emphasis-faces font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b9297563a043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil] 3 [show-paren--locate-near-paren show-paren--default show-paren-function apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil] 2 [mapc seq-do seq-find org-cite-get-processor org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b921becf8143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 4 [font-lock-flush org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b921becf8143>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil] 23 [org-fold-core-get-folding-spec-from-alias org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b925964d9e43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 6 [org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94b16ee5443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 20 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc067c4c3a43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil] 3 [let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94b16ee5443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 3 [font-lock-fontify-region "#<compiled -0x1568bc324ec53843>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil] 18 [org-fold-core-get-folding-spec-from-alias org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 1 [org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568ba78ce3f9743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 13 ["#<compiled -0x1568b94b16ee5443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil] 3 [buffer-match-p show-paren--enabled-p show-paren-function apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil] 3 [org-element--cache-after-change delete-forward-char funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 2 [insert-before-markers-and-inherit org-todo funcall-interactively org-shiftright funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 3 [mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568ba78ce3f9743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively] 3 [save-excursion progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc384ec73043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively] 3 [font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc3ffa323243>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively command-execute nil nil nil nil] 4 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94f1c2d9643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively] 3 [mapc org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move-visual line-move next-line funcall-interactively] 3 [org-fold-core--property-symbol-get-create "#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc384ec73043>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line] 3 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc385fdc2b43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function line-move next-line funcall-interactively command-execute nil nil nil nil nil nil] 10 [run-at-time undo-auto--boundary-ensure-timer undo-auto--undoable-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 4 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-folded-p not and if save-restriction save-excursion progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568ba78ce3f9743>"] 6 [org-fold-core-get-folding-spec org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc20d29f5d43>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil] 23 [timer-event-handler nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 2 [org-fold-core--property-symbol-get-create org-fold-core-get-folding-spec org-fold-folded-p and while let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2d07634543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p blink-matching-open] 3 [font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function pos-visible-in-window-p blink-matching-open blink-paren-post-self-insert-function "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil] 4 [org-activate-footnote-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc277590a743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 4 [org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 7 [org-activate-links font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568ba78ce3f9743>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 4 [org-fold-core-get-folding-spec-from-alias org-fold-core-get-region-at-point org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil] 3 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>" mapcar org-fold-core-next-folding-state-change org-fold-core--fix-folded-region "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 3 [org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil] 3 [progn if let org-activate-folds font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94f1c2d9643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil] 6 ["#<compiled 0x84e099b9d36e0ee>" mapc seq-do seq-find org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94b16ee5443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil] 3 [derived-mode-p font-lock-set-defaults font-lock-fontify-region "#<compiled -0x1568b94f1c2d9643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil] 4 [jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil] 3 [org-element--cache-sync org-element-at-point "#<subr org-return>" apply org-return funcall-interactively command-execute nil nil nil nil nil nil nil nil nil] 3 [font-lock-set-defaults font-lock-fontify-region "#<compiled -0x1568b94f1c2d9643>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil] 5 [org-element-headline-parser org-element--cache-for-removal org-element--cache-submit-request org-element--cache-after-change "#<subr org-self-insert-command>" apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil] 3 ["#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_22>" mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil] 3 [mapcar org-fold-core-next-folding-state-change org-fold-core-get-regions org-fold-region org-unfontify-region font-lock-unfontify-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568b94b16ee5443>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 3 [apply org-self-insert-command funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 3 [seq-do seq-find org-cite-get-processor org-cite-processor-has-capability-p org-cite-activate font-lock-fontify-keywords-region font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x1568bc2320d43543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil] 6 [next-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil nil] 5 [forward-sexp elisp--preceding-sexp elisp--eval-last-sexp eval-last-sexp funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 5 [Automatic\ GC] 330)) (26101 39955 208865 599000) nil]

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

* Re: Things got very slow: profiler output
  2024-03-16 13:31                           ` Bruno Cardoso
@ 2024-03-16 15:56                             ` Ihor Radchenko
  2024-03-16 18:39                               ` William Denton
  2024-03-16 20:21                               ` Bruno Cardoso
  0 siblings, 2 replies; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-16 15:56 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

> On 2024-03-16, 08:56 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> Bruno Cardoso <cardoso.bc@gmail.com> writes:
>>
>> What if you try the following version of `org-activate-folds'?
>> ...
>
> It makes almost no difference.

Ok.
Then, what about the latest main?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-16 15:56                             ` Ihor Radchenko
@ 2024-03-16 18:39                               ` William Denton
  2024-03-16 18:56                                 ` Ihor Radchenko
  2024-03-16 20:21                               ` Bruno Cardoso
  1 sibling, 1 reply; 30+ messages in thread
From: William Denton @ 2024-03-16 18:39 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Bruno Cardoso, Emacs Org mode mailing list

On Saturday, March 16th, 2024 at 11:56, Ihor Radchenko <yantar92@posteo.net> wrote:

> > > What if you try the following version of `org-activate-folds'?
> > > ...
> > 
> > It makes almost no difference.
> 
> Ok.
> Then, what about the latest main?

I tried it, and I'm sorry to say all the same problems keep happening.  

I tried the test you mentioned here:

https://lists.gnu.org/archive/html/emacs-orgmode/2024-03/msg00362.html

I loaded up my big Org file and moved around a while.  I got:

Function Name                              Call Count  Elapsed Time  Average Time
org-fold-core--property-symbol-get-create  33325       0.0058796690  1.764...e-07

I don't know if that's helpful.

For me all this is triggered by my work-diary.org file, which has fair bit of fontification in it: headings, 1200 clock entries, links, and so on.  It had a big clockable at the bottom, which gave me the "Stack overflow in regexp matcher" I mentioned last month:

https://lists.gnu.org/archive/html/emacs-orgmode/2024-02/msg00347.html

I moved the clocktable to another file and the error stopped.  But now it's back.  I've been adding to work-diary.org in the meantime, so perhaps the problem was triggered by going over some limit, and I got it down under that limit, but now it's back over.  Bruno's problem is triggered by a large file---but surely many people here have large files in Org, so why aren't they seeing this?  Frustrating.

I turned on debugging and will the regex overflow stack trace below in case it's helpful.  (This is beyond my debugging skills, so I'm just pasting in anything I've got now.)

To be clear:  all these problems happen when I use the latest Org development source.  Using the Org in the current Emacs development tree (I'm on 30.0.50), there's no problem.  The Emacs source doesn't have the commit I identified earlier as being where my problems started.  I'm toggling between versions by commenting this on or off:

(use-package org
    ;; :pin manual
    ;; :load-path "/usr/local/src/org-mode/lisp"

Ihor and Bruno, might it help if we did a video call and shared screens to see problems live?  My Lisp is limited but I'll help how I can.


Thanks,

Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada

 Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
  re-search-forward("^[ \11]*\\(\\\\begin{\\([a-zA-Z0-9\\*]+\\)\\(?:.\\|\n\\)+?\\\\end{\\2}\\)\\|\\([^$]\\|^\\)\\(\\$[^ \11\15\n,;.$]\\$\\)\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)\\|\\([^$]\\|^\\)\\(\\(\\$\\([^ \11\n,;.$][^$\n\15]*?\\(\n[^$\n\15]*?\\)\\{0,2\\}[^ \11\n,.$]\\)\\$\\)\\)\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)\\|\\\\(\\(?:.\\|\n\\)*?\\\\)\\|\\\\\\[\\(?:.\\|\n\\)*?\\\\\\]\\|\\$\\$\\(?:.\\|\n\\)*?\\$\\$" nil t)
  org-do-latex-and-related(#<marker at 770 in work-diary.org>)
  font-lock-fontify-keywords-region(522 #<marker at 770 in work-diary.org> nil)
  font-lock-default-fontify-region(522 #<marker at 770 in work-diary.org> nil)
  font-lock-fontify-region(522 #<marker at 770 in work-diary.org>)
  #f(compiled-function (beg end) #<bytecode -0x356cca3983ed8d0>)(522 #<marker at 770 in work-diary.org>)
  font-lock-ensure(522 #<marker at 770 in work-diary.org>)
  org-table-align()
  org-table-map-tables(org-table-align t)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.yml$" . yaml-mode) ("\\.\\(r\\(?:ng\\|ss\\)\\|s\\(?:ch\\|vg\\)\\|x\\(?:ml\\|s\\(?:d\\|lt\\)\\)\\)\\'" . nxml-mode) ("\\.[pP][dD][fF]\\'" . pdf-view-mode) ("README\\.md\\'" . gfm-mode) ("\\(?:\\(?:\\.\\(?:b\\(?:\\(?:abel\\|ower\\)rc\\)\\|json\\(?:ld\\)?\\)\\|composer\\.lock\\)\\'\\)" . json-mode) ("\\.hva\\'" . LaTeX-mode) ("\\.tsv\\'" . tsv-mode) ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.[Ss][Aa][Ss]\\'" . SAS-mode) ("\\.Sout\\'" . S-transcript-mode) ("\\.[Ss]t\\'" . S-transcript-mode) ("\\.Rd\\'" . Rd-mode) ("DESCRIPTION\\'" . conf-colon-mode) ("/Makevars\\(\\.win\\)?\\'" . makefile-mode) ("\\.[Rr]out\\'" . ess-r-transcript-mode) ("CITATION\\'" . ess-r-mode) ("NAMESPACE\\'" . ess-r-mode) ("\\.[rR]profile\\'" . ess-r-mode) ("\\.[rR]\\'" . ess-r-mode) ("/R/.*\\.q\\'" . ess-r-mode) ("\\.[Jj][Aa][Gg]\\'" . ess-jags-mode) ("\\.[Bb][Mm][Dd]\\'" . ess-bugs-mode) ("\\.[Bb][Oo][Gg]\\'" . ess-bugs-mode) ("\\.[Bb][Uu][Gg]\\'" . ess-bugs-mode) ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode) ("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|axlsx\\|jbuilder\\|rabl\\|gemspec\\|podspec\\)\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Puppet\\|Berks\\|Brew\\|Fast\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'" . ruby-mode) ("\\.re?st\\'" . rst-mode) ("/\\(?:Pipfile\\|\\.?flake8\\)\\'" . conf-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.cs\\'" . csharp-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer work-diary.org> "~/york/shared/work-diaries/work-diary.org" nil nil "~/york/shared/work-diaries/work-diary-2023-2024.org" (10223630 66310))
  find-file-noselect("/home/wdenton/york/shared/work-diaries/work-diary.org")
  org-clock-load()
  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()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.yml$" . yaml-mode) ("\\.\\(r\\(?:ng\\|ss\\)\\|s\\(?:ch\\|vg\\)\\|x\\(?:ml\\|s\\(?:d\\|lt\\)\\)\\)\\'" . nxml-mode) ("\\.[pP][dD][fF]\\'" . pdf-view-mode) ("README\\.md\\'" . gfm-mode) ("\\(?:\\(?:\\.\\(?:b\\(?:\\(?:abel\\|ower\\)rc\\)\\|json\\(?:ld\\)?\\)\\|composer\\.lock\\)\\'\\)" . json-mode) ("\\.hva\\'" . LaTeX-mode) ("\\.tsv\\'" . tsv-mode) ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.[Ss][Aa][Ss]\\'" . SAS-mode) ("\\.Sout\\'" . S-transcript-mode) ("\\.[Ss]t\\'" . S-transcript-mode) ("\\.Rd\\'" . Rd-mode) ("DESCRIPTION\\'" . conf-colon-mode) ("/Makevars\\(\\.win\\)?\\'" . makefile-mode) ("\\.[Rr]out\\'" . ess-r-transcript-mode) ("CITATION\\'" . ess-r-mode) ("NAMESPACE\\'" . ess-r-mode) ("\\.[rR]profile\\'" . ess-r-mode) ("\\.[rR]\\'" . ess-r-mode) ("/R/.*\\.q\\'" . ess-r-mode) ("\\.[Jj][Aa][Gg]\\'" . ess-jags-mode) ("\\.[Bb][Mm][Dd]\\'" . ess-bugs-mode) ("\\.[Bb][Oo][Gg]\\'" . ess-bugs-mode) ("\\.[Bb][Uu][Gg]\\'" . ess-bugs-mode) ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode) ("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|axlsx\\|jbuilder\\|rabl\\|gemspec\\|podspec\\)\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Puppet\\|Berks\\|Brew\\|Fast\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'" . ruby-mode) ("\\.re?st\\'" . rst-mode) ("/\\(?:Pipfile\\|\\.?flake8\\)\\'" . conf-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.cs\\'" . csharp-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil nil)
  find-file-noselect-1(#<buffer init.org> "~/.emacs.d/init.org" :nowarn nil "~/.emacs.d/init.org" (9704630 66310))
  find-file-noselect("/home/wdenton/.emacs.d/init.org" :nowarn)
  desktop-restore-file-buffer("/home/wdenton/.emacs.d/init.org" "init.org" nil)
  desktop-create-buffer(208 "/home/wdenton/.emacs.d/init.org" "init.org" org-mode (font-lock-mode visual-line-mode prettify-symbols-mode corfu-mode anzu-mode yas-minor-mode undo-tree-mode git-gutter-mode wrap-region-mode flyspell-mode org-appear-mode org-superstar-mode mixed-pitch-mode org-indent-mode) 3969 (nil nil) nil nil ((tab-width . 8) (indent-tabs-mode) (buffer-display-time 26101 53586 2647 436000) (buffer-file-coding-system . utf-8-unix) (truncate-lines)) ((mark-ring nil)))
  eval-buffer(#<buffer  *load*> nil "/home/wdenton/.emacs.d/.emacs.desktop" nil t)  ; Reading at buffer position 6154
  load-with-code-conversion("/home/wdenton/.emacs.d/.emacs.desktop" "/home/wdenton/.emacs.d/.emacs.desktop" t t)
  load("/home/wdenton/.emacs.d/.emacs.desktop" t t t)
  desktop-read()
  #f(compiled-function () #<bytecode 0x16157c4861c754ea>)()
  run-hooks(after-init-hook delayed-warnings-hook)
  command-line()
  normal-top-level()



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

* Re: Things got very slow: profiler output
  2024-03-16 18:39                               ` William Denton
@ 2024-03-16 18:56                                 ` Ihor Radchenko
  2024-03-17 18:59                                   ` William Denton
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-16 18:56 UTC (permalink / raw)
  To: William Denton; +Cc: Bruno Cardoso, Emacs Org mode mailing list

William Denton <william@williamdenton.org> writes:

>> Then, what about the latest main?
>
> I tried it, and I'm sorry to say all the same problems keep happening.  
>
> I tried the test you mentioned here:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2024-03/msg00362.html
>
> I loaded up my big Org file and moved around a while.  I got:
>
> Function Name                              Call Count  Elapsed Time  Average Time
> org-fold-core--property-symbol-get-create  33325       0.0058796690  1.764...e-07
>
> I don't know if that's helpful.

You are getting similar numbers with me.
I suspect that your problem is different from Bruno's.

> For me all this is triggered by my work-diary.org file, which has fair bit of fontification in it: headings, 1200 clock entries, links, and so on.  It had a big clockable at the bottom, which gave me the "Stack overflow in regexp matcher" I mentioned last month:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2024-02/msg00347.html

Did you try setting org-highlight-latex-and-related to nil?

> Ihor and Bruno, might it help if we did a video call and shared screens to see problems live?  My Lisp is limited but I'll help how I can.

We may. Although I suspect that something peculiar in your Org file is
making the Emacs regexp engine choke. I am wondering what happens when
you try the default value of org-highlight-latex-and-related.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-16 15:56                             ` Ihor Radchenko
  2024-03-16 18:39                               ` William Denton
@ 2024-03-16 20:21                               ` Bruno Cardoso
  2024-03-16 21:14                                 ` Ihor Radchenko
  1 sibling, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-16 20:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list

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


On 2024-03-16, 15:56 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:

> Ok.
> Then, what about the latest main?

Updated and tested again on Emacs -Q.

org-fold-core--property-symbol-get-create  145790      0.5319647139  3.648...e-06

GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.40, cairo version 1.18.0)
Org mode version 9.7-pre (release_9.6.21-1289-gae50b9)


[-- Attachment #2: 20240316_profiler-org.txt --]
[-- Type: text/plain, Size: 1370 bytes --]


[profiler-profile "28.1" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([display-buffer-use-some-window display-buffer pop-to-buffer switch-to-buffer-other-window profiler-report-profile-other-window profiler-report-cpu profiler-report progn elisp--eval-last-sexp eval-last-sexp funcall-interactively command-execute nil nil nil nil] 3 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 111 [line-move next-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 24 [next-line funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil nil] 3 [redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 2 [font-lock-default-fontify-region font-lock-fontify-region "#<compiled -0x156e1aa917ba2543>" jit-lock--run-functions jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil] 7 [timer-inc-time timer-event-handler nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 4 [eval redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 2 [progn elisp--eval-last-sexp eval-last-sexp funcall-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 7 [Automatic\ GC] 12)) (26101 65122 534040 823000) nil]

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

* Re: Things got very slow: profiler output
  2024-03-16 20:21                               ` Bruno Cardoso
@ 2024-03-16 21:14                                 ` Ihor Radchenko
  2024-03-17 13:02                                   ` Bruno Cardoso
  0 siblings, 1 reply; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-16 21:14 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

> On 2024-03-16, 15:56 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> Ok.
>> Then, what about the latest main?
>
> Updated and tested again on Emacs -Q.
>
> org-fold-core--property-symbol-get-create  145790      0.5319647139  3.648...e-06

It is a few times faster. And the profiler shows no slowdown, AFAIU.
Is the problem solved?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-16 21:14                                 ` Ihor Radchenko
@ 2024-03-17 13:02                                   ` Bruno Cardoso
  2024-03-17 14:19                                     ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: Bruno Cardoso @ 2024-03-17 13:02 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: William Denton, Emacs Org mode mailing list



On 2024-03-16, 21:14 +0000, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> It is a few times faster. And the profiler shows no slowdown, AFAIU.
> Is the problem solved?
>

Hi Ihor. I accidentally cut out part of my last reply, sorry.

Yes, it looks like the situation greatly improved on latest main. I guess the problem is solved on my side. Thank you very much!

Best,

Bruno.



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

* Re: Things got very slow: profiler output
  2024-03-17 13:02                                   ` Bruno Cardoso
@ 2024-03-17 14:19                                     ` Ihor Radchenko
  0 siblings, 0 replies; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-17 14:19 UTC (permalink / raw)
  To: Bruno Cardoso; +Cc: William Denton, Emacs Org mode mailing list

Bruno Cardoso <cardoso.bc@gmail.com> writes:

>> It is a few times faster. And the profiler shows no slowdown, AFAIU.
>> Is the problem solved?
>>
>
> Hi Ihor. I accidentally cut out part of my last reply, sorry.
>
> Yes, it looks like the situation greatly improved on latest main. I guess the problem is solved on my side. Thank you very much!

Good to hear.
Then, back to William's problem :)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Things got very slow: profiler output
  2024-03-16 18:56                                 ` Ihor Radchenko
@ 2024-03-17 18:59                                   ` William Denton
  2024-03-17 19:33                                     ` Ihor Radchenko
  0 siblings, 1 reply; 30+ messages in thread
From: William Denton @ 2024-03-17 18:59 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Bruno Cardoso, Emacs Org mode mailing list

On Saturday, March 16th, 2024 at 14:56, Ihor Radchenko <yantar92@posteo.net> wrote:

> Did you try setting org-highlight-latex-and-related to nil?

That did it!  Thank you!  Org is back to normal, fast and responsive.  What do you make of all this?  Was it just something about my individual setup?

(In fact I now have it set to '(script entities).  Both 'latex and 'native gave me the problems, but this works.)


Thanks again,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada



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

* Re: Things got very slow: profiler output
  2024-03-17 18:59                                   ` William Denton
@ 2024-03-17 19:33                                     ` Ihor Radchenko
  0 siblings, 0 replies; 30+ messages in thread
From: Ihor Radchenko @ 2024-03-17 19:33 UTC (permalink / raw)
  To: William Denton; +Cc: Bruno Cardoso, Emacs Org mode mailing list

William Denton <william@williamdenton.org> writes:

> On Saturday, March 16th, 2024 at 14:56, Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> Did you try setting org-highlight-latex-and-related to nil?
>
> That did it!  Thank you!  Org is back to normal, fast and responsive.  What do you make of all this?  Was it just something about my individual setup?

> (In fact I now have it set to '(script entities).  Both 'latex and 'native gave me the problems, but this works.)

That's because `org-latex-regexps' is a bit too complex for Emacs regexp
engine in some cases. For some unfortunate Org files, these regexps may
trigger stack overflow while matching.

Eventually, we will switch to parser-based fontification, and the
problem will be solved.

For now, I have no clue how to simplify the problematic regexps without
risking regressions.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2024-03-17 19:33 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29  5:13 Things got very slow: profiler output William Denton
2024-02-29  9:21 ` Bruno Barbier
2024-02-29  9:28   ` Ihor Radchenko
     [not found] ` <notmuch-sha1-998a6a574db756b51dbdd759ff59b5174d99c7f1>
2024-02-29  9:25   ` Bruno Barbier
2024-03-07 16:12     ` William Denton
2024-03-07 17:42       ` Bruno Barbier
2024-03-09 19:27       ` William Denton
2024-03-12 12:43         ` Ihor Radchenko
2024-03-13 23:19           ` Bruno Cardoso
2024-03-14  1:17             ` William Denton
2024-03-14  7:34               ` Gerard Vermeulen
2024-03-14 10:27                 ` Bruno Cardoso
2024-03-14 10:22               ` Bruno Cardoso
2024-03-14 21:23             ` Ihor Radchenko
2024-03-15  1:09               ` Bruno Cardoso
2024-03-15 14:24                 ` Ihor Radchenko
2024-03-15 16:33                   ` Bruno Cardoso
2024-03-15 17:18                     ` Ihor Radchenko
2024-03-15 17:49                       ` Bruno Cardoso
2024-03-16  8:56                         ` Ihor Radchenko
2024-03-16 13:31                           ` Bruno Cardoso
2024-03-16 15:56                             ` Ihor Radchenko
2024-03-16 18:39                               ` William Denton
2024-03-16 18:56                                 ` Ihor Radchenko
2024-03-17 18:59                                   ` William Denton
2024-03-17 19:33                                     ` Ihor Radchenko
2024-03-16 20:21                               ` Bruno Cardoso
2024-03-16 21:14                                 ` Ihor Radchenko
2024-03-17 13:02                                   ` Bruno Cardoso
2024-03-17 14:19                                     ` Ihor Radchenko

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.