Closed 80avin closed 1 month ago
Hi,
There is a rewrite of the plugin you should try. :) See the Readme at the top. You can define your own searches very easily if you need in that version and it fixes a lot of edge cases and bugs. I think you will like it.
This is too slow and searches lot many directories than expected. Example, on my mac I have a python project in
/Users/80avin/myproject
But it searches everything under/Users
directory taking around a minute to get all results.Issue
While
config.settings.parents
limits how many level up should we search, there is no limit how much deep. Also, fd appears to iterate almost every path and tests it against the regex.Suggestions:
Optimize the directory search
Either, search only fixed level depth from a parent directory. This may remove the need of
config.settings.parents
Refer vscode's implementation to find what to search: https://github.com/microsoft/vscode-python/blob/975010ee14f61c5b9239ee125e57fbfb58f8e963/src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts#L248-L268