Skip to content

Conversation

@mauricioszabo
Copy link
Contributor

Fixes INotify watches being exhausted when someone on Linux with a lot of packages and files on .pulsar-next directory opens Pulsar

@savetheclocktower
Copy link
Contributor

This is fine, but I really do need a working theory as to how the additional watching of a single directory — even one as potentially deep as the Pulsar home folder — could involve over 40,000 extra inotify watchers.

In theory, both nsfw and @parcel/watcher would need exactly one watcher per directory. So is it possible that you have ~40,000 unique directories below your .pulsar-next folder?

@savetheclocktower
Copy link
Contributor

Ugh. OK, fine:

cd ~/.pulsar-next && find . -type d | wc -l

produces 34582 for me.

compile-cache seems to have lots and lots of unique directories. This is a problem and suggests to me that we should avoid using watchPath on anything within the .pulsar-next folder, at least until we have a way of adding a non-recursive watcher.

@savetheclocktower
Copy link
Contributor

OK, fine by me. Landing this!

(It turns out we have some specific requirements for file-watching that go beyond what src/path-watcher.js can do. I'll probably capture this in a new enhancement issue.)

@savetheclocktower savetheclocktower merged commit e2a2206 into updated-latest-electron Jul 11, 2025
102 of 103 checks passed
@savetheclocktower savetheclocktower deleted the fix-stylesheet-file-watcher branch July 11, 2025 08:15
@mauricioszabo
Copy link
Contributor Author

Just for the record, my .pulsar-next folder have about 40k directories, and opening Pulsar in some specific project added 22k other watchers... that's how it exploded my watchers :(

Still, this PR keeps the functionality of watching only the stylesheet file that was originally on Atom, so we are not changing anything. But I agree we could benefit of watching a single, non-recursive directory too.

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.

3 participants