bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

projectile-find-file-in-known-projects opening too many file watchers on large type script projects #158

Closed gmath closed 1 year ago

gmath commented 2 years ago

Expected behavior

I expect to repeatedly be able to use projectile-find-file-in-known-projects without consuming too many system resources.

Actual behavior

I've observed that this command is causing too many file watchers to be registered and it is preventing me from doing other related tasks that require a file watcher.

Using this script I have identified that before calling the command projectile-find-file-in-known-projects there are few watchers (<<1000) per PID. After calling the command a new PID is created with more than 10k file watchers. Calling the command in another buffer launches a new PID with as many, if not more watchers. Doing this more than a handful of times is enough to exhaust the system limit.

Steps to reproduce the problem

Get a large TS project, use the above script, and see what happens. My .spacemacs is setup like this

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information