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

Diff-hl and Org-mode #107

Open
fpopineau opened this issue Jun 24, 2018 · 8 comments
Open

Diff-hl and Org-mode #107

fpopineau opened this issue Jun 24, 2018 · 8 comments

Comments

@fpopineau
Copy link

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

@dgutov
Copy link
Owner

dgutov commented Jun 24, 2018

With flydiff or without?

@fpopineau
Copy link
Author

fpopineau commented Jun 24, 2018 via email

@dgutov
Copy link
Owner

dgutov commented Nov 23, 2018

Sorry, not ideas from me here. Someone should profile it, probably with a native level profiler.

@mohkale
Copy link

mohkale commented Jun 7, 2021

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.

@mohkale
Copy link

mohkale commented Jun 7, 2021

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.

@dgutov
Copy link
Owner

dgutov commented Jun 8, 2021

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.

@mohkale
Copy link

mohkale commented Jun 8, 2021

@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.

@dgutov
Copy link
Owner

dgutov commented Oct 2, 2023

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.

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

3 participants