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

[Patch Request] Increast PTY performance by 95% #77

Open
gf3 opened this issue Oct 17, 2022 · 3 comments
Open

[Patch Request] Increast PTY performance by 95% #77

gf3 opened this issue Oct 17, 2022 · 3 comments

Comments

@gf3
Copy link

gf3 commented Oct 17, 2022

Excellent write-up: https://tdodge.consulting/blog/eshell/background-output-thread

Implementing this patch offers a ~95% improvement for PTY speed which is useful for a handful of different features but particularily eshell performance.

@gf3
Copy link
Author

gf3 commented Oct 17, 2022

cc: @tyler-dodge in case there is additional context that might be useful

@tyler-dodge
Copy link

Thanks for the mention, I have been working on a few changes since that blog post that are related to this.

I've been working on making it so that writing to the background process is also handled on the background thread for input that's larger than the buffer size (this makes working with subprocesses like LSP servers much more performant when you're sending the entire buffer over on change events). At this point, I do not know of any bugs from that, but there are probably still edge cases that I do not know about. I recently made a commit that fixes a deadlock that came from it, but haven't observed any deadlocks since that commit.

That work is being done on https://github.com/tyler-dodge/emacs/tree/tyler-main-2, however, it has some other changes that are a bit more idiosyncratic and are of questionable usefulness.

If you all are interested, I could push another branch with just the changes related to the process.c changes which would also be rebased off of a more recent commit from upstream.

@gf3
Copy link
Author

gf3 commented Oct 19, 2022

thanks for the context @tyler-dodge. this may also be of interest to @d12frosted for https://github.com/d12frosted/homebrew-emacs-plus

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