>>>>> On Wed, 15 Mar 2023 17:12:19 +0000, João Távora <joaotavora@gmail.com> said:
João> Hi Elliott,
João> On Tue, Mar 14, 2023, 16:10 Elliott Shugerman <eeshugerman@gmail.com> wrote:
>>
>> I work on a large codebase with LSP and used to run into the "too many
>> open files" error all the time unless I disabled desired functionality or
>> gave up native-comp. Now, with this patch, not only is that issue gone
>> entirely, but I find Emacs is generally more responsive and stable on macOS.
>>
João> What LSP server are you using? Is it perhaps requesting many file watchers?
João> Or maybe the client is overwatching on the Emacs side (what client are you
João> using?). Do you have a JSONRPC transcript that you can share with me?
Itʼs a macOS thing: file watching there uses a file descriptor
per-file, unlike Linux, which uses one per-directory.
Yes, for sure that should be improved.
But the watches that the client are could also be reduced, perhaps. Maybe, depending on the use case, it makes sense to only watch files on behalf of the LSP that Emacs is actually visiting (Eglot doesn't do that, but maybe it could). All depends on the use case, and that's what I'm interested in.
João