Re: Things got very slow: profiler output

2024-03-17 Thread Ihor Radchenko
William Denton writes: > On Saturday, March 16th, 2024 at 14:56, Ihor Radchenko > 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 i

Re: Things got very slow: profiler output

2024-03-17 Thread William Denton
On Saturday, March 16th, 2024 at 14:56, Ihor Radchenko 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 hav

Re: Things got very slow: profiler output

2024-03-17 Thread Ihor Radchenko
Bruno Cardoso 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

Re: Things got very slow: profiler output

2024-03-17 Thread Bruno Cardoso
On 2024-03-16, 21:14 +, Ihor Radchenko 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 pr

Re: Things got very slow: profiler output

2024-03-16 Thread Ihor Radchenko
Bruno Cardoso writes: > On 2024-03-16, 15:56 +, Ihor Radchenko 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 s

Re: Things got very slow: profiler output

2024-03-16 Thread Bruno Cardoso
On 2024-03-16, 15:56 +, Ihor Radchenko 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 versi

Re: Things got very slow: profiler output

2024-03-16 Thread Ihor Radchenko
William Denton 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 ar

Re: Things got very slow: profiler output

2024-03-16 Thread William Denton
On Saturday, March 16th, 2024 at 11:56, Ihor Radchenko 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

Re: Things got very slow: profiler output

2024-03-16 Thread Ihor Radchenko
Bruno Cardoso writes: > On 2024-03-16, 08:56 +, Ihor Radchenko wrote: > >> Bruno Cardoso 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 co

Re: Things got very slow: profiler output

2024-03-16 Thread Bruno Cardoso
On 2024-03-16, 08:56 +, Ihor Radchenko wrote: > Bruno Cardoso 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 (searc

Re: Things got very slow: profiler output

2024-03-16 Thread Ihor Radchenko
Bruno Cardoso 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 fol

Re: Things got very slow: profiler output

2024-03-15 Thread Bruno Cardoso
On 2024-03-15, 17:18 +, Ihor Radchenko wrote: > Bruno Cardoso 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-res

Re: Things got very slow: profiler output

2024-03-15 Thread Ihor Radchenko
Bruno Cardoso 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-activa

Re: Things got very slow: profiler output

2024-03-15 Thread Bruno Cardoso
On 2024-03-15, 14:24 +, Ihor Radchenko 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/un

Re: Things got very slow: profiler output

2024-03-15 Thread Ihor Radchenko
Bruno Cardoso 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,

Re: Things got very slow: profiler output

2024-03-14 Thread Bruno Cardoso
On 2024-03-14, 21:23 +, Ihor Radchenko 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 1 (org-fold-core--property-symbol-get-create 'outline > nil t)) > from ins

Re: Things got very slow: profiler output

2024-03-14 Thread Ihor Radchenko
Bruno Cardoso 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 h

Re: Things got very slow: profiler output

2024-03-14 Thread Bruno Cardoso
On 2024-03-14, 07:34 +, Gerard Vermeulen 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

Re: Things got very slow: profiler output

2024-03-14 Thread Bruno Cardoso
On 2024-03-14, 01:17 +, William Denton 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 > 5d186b49

Re: Things got very slow: profiler output

2024-03-14 Thread Gerard Vermeulen
On 14.03.2024 02:17, William Denton wrote: On Wednesday, March 13th, 2024 at 19:19, Bruno Cardoso 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

Re: Things got very slow: profiler output

2024-03-13 Thread William Denton
On Wednesday, March 13th, 2024 at 19:19, Bruno Cardoso 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 new

Re: Things got very slow: profiler output

2024-03-13 Thread Bruno Cardoso
On 2024-03-12, 12:43 +, Ihor Radchenko 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

Re: Things got very slow: profiler output

2024-03-12 Thread Ihor Radchenko
William Denton 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 > Date: Sun Feb 25 11:42:4

Re: Things got very slow: profiler output

2024-03-09 Thread William Denton
On Thursday, March 7th, 2024 at 11:12, William Denton 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

Re: Things got very slow: profiler output

2024-03-07 Thread Bruno Barbier
William Denton writes: > On Thursday, February 29th, 2024 at 04:25, Bruno Barbier > 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. >

Re: Things got very slow: profiler output

2024-03-07 Thread William Denton
On Thursday, February 29th, 2024 at 04:25, Bruno Barbier 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: |

Re: Things got very slow: profiler output

2024-02-29 Thread Bruno Barbier
Bruno Barbier writes: > Hi William, > > William Denton 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

Re: Things got very slow: profiler output

2024-02-29 Thread Ihor Radchenko
Bruno Barbier 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-rel

Re: Things got very slow: profiler output

2024-02-29 Thread Bruno Barbier
Hi William, William Denton 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 ra