-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to ignore directories in project and reduce file picker debounce time #23504
Comments
Hi @AmerM137 sorry for the late response and thank you for the feedback! Regarding your questions:
I think we don't have a way to do that, sorry. For the moment, as you mention, we only offer a filter for files using glob patterns over the Files pane,
If you are using Spyder 6, we implemented a search feature that enables you to search files all over the active project directory which could cause some performance degradation as mentioned over #22461. Probably in a future release we will add an option to disable it. Besides that, there is also another issue about performance when you have an active project on Windows that could be related with what you are experiencing at #22556 Let us know if the info above helps! |
Hi @dalthviz, unfortunately I don't have a way to reduce the number of files. I have the root directory of the project open in spyder, and I have a It would be great if we can just specify an entire folder to ignore. I would like to ignore my My current project is medium size I'd say, ~ 7700 files. At most, I am interested in about ~500-1000 of these files. Sometimes I have an |
Thank you for the extra info @AmerM137 ! Reading this again, and just to be sure, by file picker you mean the file switcher widget, right? So this widget: And I guess then you would like to have a way to exclude/ignore specific file extensions and directories from the file switcher search (which I think makes sense) hoping that such exclusion config increases the responsiveness of the file switcher, right? Let us know! |
Yes correct! Edit: Also it would be really good if the results come back faster, what I am calling debounce time. I think searching through less files should improve it, but I feel like there's a set amount of time the picker is "thinking" before results come back, even if it's only a few of them. Hope this makes sense. |
What do you think about this @spyder-ide/core-developers ? |
This is interesting... |
I am a bit afraid that not many people will find the option to ignore directories in a project. Maybe we should first try to optimize the File Switcher? If that turns out to be too hard or impossible, we can add an option.
@mrclary The changelog implies that this only works "in conda environments or if the fzf package is installed". |
Hmm... both conditions are satisfied for my setup:
|
@mrclary are you sure you have a Spyder project open? On my setup, there is a ".spyproject" directory in my project root directory. |
Yep, project open in Spyder, ![]() |
Thanks @mrclary and @jitseniesen for the comments!
Could it be that fzf has issues on macOS? On Windows even without typing anything in the File Switcher lineedit to search I can see the project files division (which I think comes from fzf checking the available files over the project directory): Maybe opening an issue to track that could be worthy 🤔
I think in terms of optimization/handle of the search performance the only idea we have though about as far as I remember is to automatically disable fzf/searching inside the projects directory in case a size threshold is reached (something like if your project has more than X amount of files fzf usage gets disabled automatically - #22461 (comment)). But trying to first find a way to make it faster makes sense to me 👍 Another thing that probably could be worthy to explore is improving the feedback for searches (maybe some sort of spinner indicating that a search is being done?) but maybe this is a little out of scope from the discussion here |
These are more like questions than actual issues.
Is there a way to ignore entire directories? I see that you can ignore specific files under the "Files" preferences but it doesn't seem like we can ignore entire directories. It would be nice to be able to do that as I tend to work with projects that have a lot of files that should not show up in the file picker.
For the file picker and the symbol finder, the debounce time (if that's the right word for it) is too high. As in, it takes too long to get feedback after I stop typing. Is there a way to reduce that so the picker/finder feels more responsive? The symbol finder in particular used to be instant in previous versions of Spyder.
The text was updated successfully, but these errors were encountered: