spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.38k stars 1.62k forks source link

Option to disable Project-wise search in "Search files by name" [Feature request] #22461

Open OverLordGoldDragon opened 2 months ago

OverLordGoldDragon commented 2 months ago

The feature is significantly slower in Spyder 6.0.0, I assume because it also includes Project files in search. I use this feature extensively, and high responsiveness is quite important to me. Can legacy behavior be provided as an option? I'd appreciate that.

dalthviz commented 3 weeks ago

Hi @OverLordGoldDragon thank you for the feedback and sorry for the late response! Related with slowness when having a project activated maybe these issues could be related: https://github.com/spyder-ide/spyder/issues/22567 and https://github.com/spyder-ide/spyder/issues/22556 . Particulary https://github.com/spyder-ide/spyder/issues/22556#issuecomment-2374716821 describes a way to patch your local Spyder installation to prevent using either fzf (which allows for searching project files) or disabling the file watcher which could help improve the responsiveness of the search.

Anyhow, what do you think @spyder-ide/core-developers ?

ccordoba12 commented 3 weeks ago

If fzf is not working as expected under some scenarios, we need to provide an option for users to disable it.

Leaving this for 6.1.0 because it requires a new entry in Preferences for the Projects plugin.

ccordoba12 commented 3 weeks ago

By the way @dalthviz, how does our fzf support work for you on Windows? For me it works really well on Linux.

dalthviz commented 3 weeks ago

I don't use much the switcher functionality to be honest but doing a quick check this is what I'm experiencing:

switcher_fzf

ccordoba12 commented 3 weeks ago

Thanks for checking @dalthviz! It works pretty much the same for me, so perhaps the problem has to do with too many files (more than 10k?) in the current project directory.

dalthviz commented 3 weeks ago

perhaps the problem has to do with too many files (more than 10k?) in the current project directory.

Maybe, do you experience a worst performance than the one shown in the GIFs above @OverLordGoldDragon ? Are you by any chance working on a project with many files?

Nonetheless, thinking this a little more. having an option to enable or disable fzf usage makes sense to me :+1:

OverLordGoldDragon commented 3 weeks ago

It's about on par, from what I recall. As for files, 1.4k in total, of which 100 are py files, and 1.1k are in .git/ (almost entirely in .git/objects). Here's a WinDirStat

ccordoba12 commented 3 weeks ago

@OverLordGoldDragon, so why do you prefer to turn off this feature?

OverLordGoldDragon commented 3 weeks ago

Well, it's very slow. Spyder 5 is nearly instant, this is 500-1000ms. I also prefer keeping the search to .py files, as I use Spyder almost exclusively for .py, though that's not as important.