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

Performance problems when using magit-todos with TRAMP #132

Open
johnhamelink opened this issue Jul 29, 2022 · 4 comments
Open

Performance problems when using magit-todos with TRAMP #132

johnhamelink opened this issue Jul 29, 2022 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed WAITING Waiting for response from someone

Comments

@johnhamelink
Copy link

johnhamelink commented Jul 29, 2022

Hi there,

First of all, I've found this extension to be very helpful indeed, particularly on a project I've inherited which has lots of TODOs that were never logged in an issue tracker!

Recently, I've been venturing beyond my desk with the help of TRAMP. However, I've found that for some reason magit-todos is not very reliable in this scenario. Specifically, there seems to be a hang during magit-todos--scan-with-git-diff. I can confirm that both the host and guest machines have ripgrep installed.

The good news, is that I seem to be able to replicate the problem by using TRAMP against localhost:

M-x project-switch-project /sshx:john@jupiter:~/code/mc/be/v2/mb_v2_backend/
g ;; to go to magit-status
M-x magit-todos-list

;; The modeline says "Opening connection
;; magit-todos--scan-with-git-diff for john@jupiter using sshx..."
;; with a spinner which stays active until it times out

(switch-to-buffer " *magit-todos--scan-with-git-diff*-127449")
;; Produces: "fatal: invalid object name 'fatal'."

Also of note, Emacs is maxing out my CPU while this happens.

I'd like to debug this further. But I'm unsure how?

One thought I had was to disable magit-todos for projects that are remote. Would that be feasible given magit-todos-mode is a global-minor-mode?

@alphapapa
Copy link
Owner

Hi,

Thanks, I'm glad that you've found it useful.

I very rarely use TRAMP, and never with magit-todos, so I don't know how much help I can be. I'd suggest trying to use the other scanners and see if that makes a difference. Also, try it on a small project rather than a large one. See also #57.

One thought I had was to disable magit-todos for projects that are remote.

If you need to, that seems like a good idea, yes. We might need to add an option for that and then a check in the code where appropriate (i.e. before running scanners).

@johnhamelink
Copy link
Author

Hi there,

I don't know how much help I can be.

Completely reasonable!

I'd suggest trying to use the other scanners and see if that makes a difference.

OK, next time I'm working out of office I'll give that a go and report back.

Thank you :)

@alphapapa alphapapa added bug Something isn't working help wanted Extra attention is needed WAITING Waiting for response from someone discussion and removed discussion labels Aug 5, 2022
@mohkale
Copy link

mohkale commented Apr 23, 2024

@alphapapa Would you consider supporting a PR to make magit-todos a non-global mode? I'd like to disable it in remote projects but still keep it in locals and atm there doesn't seem to be an inbetween option 🤔.

@alphapapa
Copy link
Owner

@alphapapa Would you consider supporting a PR to make magit-todos a non-global mode? I'd like to disable it in remote projects but still keep it in locals and atm there doesn't seem to be an inbetween option 🤔.

The intended way to disable scanning in a repository is to set magit-todos-update to nil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed WAITING Waiting for response from someone
Projects
None yet
Development

No branches or pull requests

3 participants