Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error("No match %d in highlight %S" 2 (2 'org-headline-done prepend)) #24

Closed
yantar92 opened this issue Mar 21, 2021 · 7 comments
Closed

Comments

@yantar92
Copy link
Owner

I doubt that font-lock is the root to the problem here. Kind of hoping to be proven wrong though!

I did a benchmark from your branch @yantar92. No performance improvement. Slower actually. Output of the tests:

With org-mode master:
Elapsed time: 1.016928s (0.102247s in 3 GCs)
Elapsed time: 115.648919s (3.886891s in 85 GCs)
Elapsed time: 0.726889s (0.054811s in 1 GCs)

With yantar92/org-fold-universal-core:
Elapsed time: 1.184400s (0.213159s in 7 GCs)
Elapsed time: 116.078592s (4.321491s in 70 GCs)
Elapsed time: 0.770061s (0.094068s in 1 GCs)

First row is with new customization on. Second with it off (showing current performance) and third is with all files already loaded into buffers.

I can note that benchmarking org-roam--list-all-files shows that's actually a significant piece of the time spent already there:

(benchmark 1 '(org-roam--list-all-files))

results:

Elapsed time: 0.390924s

These numbers are with my personal setup though, Emacs 28.0.50 on Windows 10 with native compilation on. Surely they can differ in another persons config but I suspect the relative performance difference is around the same. (i.e. around 100x faster with this customization)

Sidenote: Got an error with the org-fold-universal-core branch. error("No match %d in highlight %S" 2 (2 'org-headline-done prepend)) Can discuss that offline if needed, to not take over this pull-request.

Originally posted by @Whil- in alphapapa/org-ql#200 (comment)

@yantar92
Copy link
Owner Author

yantar92 commented Mar 21, 2021

It looks like match-data is changed somewhere where it is not supposed to.

@yantar92
Copy link
Owner Author

@Whil- By any chance, do you know what kind of org file triggers the error?

@Whil-
Copy link
Contributor

Whil- commented Mar 21, 2021

FIle sent offline

@yantar92
Copy link
Owner Author

FIle sent offline

Thanks! Though I cannot reproduce neither with my config nor with clean emacs. I guess, there is some strange interaction between this branch and org-roam.

@Whil-
Copy link
Contributor

Whil- commented Mar 21, 2021

Hmm, yeah. Sucks to debug other ppls's problems... :( Sorry for not being more specific here.

If it helps it could have to do with org-startup-folded being set to show2levels. Also, there were a couple of compile warnings related to org-fold (I believe was the name). Don't have the record of exactly what now though.

@yantar92
Copy link
Owner Author

yantar92 commented Mar 22, 2021

If it helps it could have to do with org-startup-folded being set to show2levels. Also, there were a couple of compile warnings related to org-fold (I believe was the name). Don't have the record of exactly what now though.

Thanks! I tried show2levels, but still cannot reproduce. Anyway, I pushed a change preventing recursive calls to font-lock, which might help here.

@Whil-
Copy link
Contributor

Whil- commented Mar 22, 2021

Ok, sorry for not being of more help here. Let's assume it's a problem with my setup for now then since it's difficult to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants