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

Respecting auto-revert-remote-files in forge-bug-reference-setup #703

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bramadams
Copy link

Fixes a similar issue as magit/magit#5222, where, when using tramp, forge would do substantial unnecessary work inside forge-bug-reference-setup, slowing down the connection or even hanging.

To fix this issue, changes similar to the original magit commit (see magit/magit@61c051e) could easily be repeated, basically shortening out the unless within forge-bug-reference-setup.

bramadams and others added 2 commits September 17, 2024 13:10
Fixes a similar issue as magit/magit#5222,
where, when using tramp, forge would do substantial unnecessary work
inside `forge-bug-reference-setup', slowing down the connection or
even hanging.

To fix this issue, changes similar to the original magit commit (see
magit/magit@61c051e)
could easily be repeated, basically shortening out the `unless'.
@tarsius
Copy link
Member

tarsius commented Sep 17, 2024

Respecting auto-revert-remote-files in forge-bug-reference-setup

auto-revert-remote-files purpose is to control an unrelated feature, and should not be repurposed here.

when using tramp, forge would do substantial unnecessary work

What part is expensive? Did you do some benchmarking?

I don't think it is "unnecessary" in the same way as was the case for magit/magit#5222. This does cause bug-references to be by "linkified", doesn't it? Doing that might be too expensive to be worth it, but "unnecessary" doesn't seem like the appropriate term, unless I am missing something.

Can you say more about the hanging? Why does that happen? Does that actually happen, or is the process just so slow, that you always abort before it completes?

@bramadams
Copy link
Author

bramadams commented Sep 17, 2024

Thanks for checking this PR!

For a given remote file, it basically hangs for at least a minute, before I manually abort. Then, if I try to open the same file again, it opens immediately. When trying a different file, the second try would work again.

Neither of these files are inside a git repository, just a regular folder where I have read/write access. When invoking tramp to access those files, I'm also not inside any local git repository. As such, it seems unnecessary for forge to jump in.

Earlier today, I made a screenshot of the stack trace after sending a SIGUSR2 to emacs while it was hanging, see attached. That's where I noticed forge-bug-reference-setup. Also, if I toggle the new variable forge-bug-reference-remote-files to nil, the hanging disappears.

stack_trace

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

Successfully merging this pull request may close these issues.

2 participants