-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Revert "emacs: set FD_SETSIZE
and DARWIN_UNLIMITED_SELECT
on darwin"
#391475
Revert "emacs: set FD_SETSIZE
and DARWIN_UNLIMITED_SELECT
on darwin"
#391475
Conversation
Counterpoint - some other sources do provide While I agree that raising the limit isn't the same as actually solving the issue, the solution-solution needs to happen upstream and until that happens, raising limit can be good enough and practical enough so that people don't end up frustrated. |
Note that the |
Can we connect at some point to actually step thru the issue? I'd really like to help you solve the frustrations, I too have dealt with them, but they usually pop up when in |
@Patryk27 So I just tested that theory, and it's exactly what's happening. When I launch any language server it spawns children, I suspect this may be the underlying cause. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have no issues with the original PR if it was exposed as an override, even if it was opt-out rather than opt-in. But especially because it is applied unconditionally to every build variant under darwin, I agree this needs to be reworked.
I’ll consider an override, but after this conversation, I’m also exploring alternative methods to achieve my desired outcome without directly modifying nixpkgs or emacs-overlay. |
LMAO, Emacs is still using the old ass inotify apis, Apple migrated away from them years ago. So I am currently estimating the effort required to enable the new api's directly in Emacs, which would be usable as an overlay until the code is upstreamed. |
Ok, so I’ve written the foundation for the updated file notifier in emacs, it should have way better performance for watching files and doesn’t use any of the old interfaces, it properly uses dispatch, and so the actual file descriptor count drops to zero. Perhaps there’s a better place for this discussion. Anyone? |
Let's merge this revert because
|
I ended up with the below flake to implement what I need. Also the max amount of process I could create with this was less than 5k (for reference). @jian-lin thanks again for all the help and sorry I caused you some extra work. flake.nix
|
Reverts #391407
This should be handled via proper MacOS apis, not some inline hack.
The changes merged introduce severe performance impacts when using emacs on battery. The FD_SETSIZE is a cheap way to fix the issues that few people have encountered when using Emacs + LSP, which points to the fact that the issue should be solved directly within the Emacs codebase and not NixPkgs.
Another reason to not go the route of FD_SETSIZE
https://threadreaderapp.com/thread/1723398619313603068.html