pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Add a feature to disable following symlinks when indexing repository

Open zbs opened this issue 2 years ago • 4 comments

Our organization routinely runs into CPU performance issues where Pylance's indexer recurses down symlinks into large data directories and consequently hoses the filesystem. This has been reported several times:

  • https://github.com/microsoft/pylance-release/issues/2041
  • https://github.com/microsoft/pylance-release/issues/2686

IIRC, the indexer behavior changed at some point to follow symlinks. Can we expose an option to disable that behavior? The approach of adding bad paths to python.analysis.exclude devolves into whack-a-mole. It's much easier to enforce that everybody in our organization disable a single setting than to require that everyone exercise discretion about which paths to add to the exclude setting. Thank you!

zbs avatar Nov 28 '23 23:11 zbs

@heejaechang any thoughts on indexer change

bschnurr avatar Nov 29 '23 16:11 bschnurr

Just wanted to follow up on this b/c we got burned by this again

zbs avatar Jan 26 '24 15:01 zbs

We are hitting this issue again. Has there been any movement on this? Thanks!

zbs avatar Feb 20 '24 17:02 zbs

Seconding this feature request. I just spent a decent chunk of time tracking down why Pylance kept crashing. It would be great to have a checkbox option to disable any symlink, which should probably be the default behavior anyway.

Adding on to this, it would be helpful to log which directories Pylance is taking too long on. Especially when this error happens: "Enumeration of workspace source files is taking longer than 10 seconds."

OFSkean avatar Aug 03 '24 04:08 OFSkean