Diff-hl and Org-mode
Hi,
Diff-hl is nice but it makes nagivating Org files much much slower. Try to open a somewhat large Org mode file, fold everything. Using C-n/C-p to navigate headings is fast without diff-hl-mode but very slow once it is turned on.
Any workaround for this ?
Regards,
Fabrice
With flydiff or without?
Sorry, not ideas from me here. Someone should profile it, probably with a native level profiler.
I've got the same issue for my dotemacs config org file that's roughly 22K lines. I tried copying it over to a new repository and diff-hl is working fine there. This might have to do with the size of the repo or the amount of history in it :/.
Profiler doesn't seem to be much help because it focuses on CPU/MEM not duration.
It also might relate to the number of changes in the file. I tried modifying roughly half the file and now every new modification I make is slower even without flydiff.
EDIT:
I comitted most of my changes and now I'm not seeing the issue anymore. Sounds like too many changes was the problem, which isn't really this packages fault.
I comitted most of my changes and now I'm not seeing the issue anymore. Sounds like too many changes was the problem, which isn't really this packages fault.
It might be hitting some pathological case, like too many overlays on a "visual" line, but indeed there's not much I can do. Nothing obvious, at least.
But if you have a solid repro, you could try M-x report-emacs-bug, and we might see it fixed. Or perhaps get some advice about the placement of overlays, at least.
@dgutov
But if you have a solid repro, you could try M-x report-emacs-bug, and we might see it fixed. Or perhaps get some advice about the placement of overlays, at least.
I see, that would be nice. I should be able to reproduce it by just reverting a big commit. I'll try to reproduce it later and send in a PR.
FWIW, Emacs 29 was released with a different data structure for overlays.
If anyone has a repro which triggered slowdown in Emacs 28 and earlier, this would be a good time to retest it.