build-emacs-for-macos
build-emacs-for-macos copied to clipboard
[Patch Request] Increast PTY performance by 95%
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.
cc: @tyler-dodge in case there is additional context that might be useful
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.
thanks for the context @tyler-dodge. this may also be of interest to @d12frosted for https://github.com/d12frosted/homebrew-emacs-plus