Conversation
The code looks good! This looks like a good change! Although the code shouldn't be scanning through the .cache file. The way the code is written the .cache will never be added to queue. But this would make the exclusion process much faster! Which over a large number of folder would make a difference and I'm assuming that's where you're actually seeing the benefit. |
|
Hmm strange. That's a bug then. If it's been marked as excluded then its shouldn't recurse into the folder |
|
I'm going to go ahead and merge this because it looks like a good change regardless of the bug. I'll open an issue for the bug. Thanks for the PR! |
|
Ah, to be clear, I believe that my PR fixes that bug. (I wasn't sure what the original intended behavior was, so I refrained from calling it as such.) |
Ahh ok. I see. No need to open an issue then :) Thanks for the clarification! |

I have
search_paths = ['~']. (The wisdom of this choice is questionable, but here we are.) When I runtms config --excluded ~/.*, it expands to exclude my~/.cache,~/.npm,~/.rustup, .etc, which is great. Howevertmstakes a long time to run because it decides to still dig through my~/.cacheand the others. This PR fixes that.As commentary, I've never written Rust before, nor any other non-GCed language, so "I have absolutely no idea what I'm doing" especially applies here. Nor do I have any experience with
aho_corasick(sounds like some Jedi) - I based it off BurntSushi's answer here. I'm assuming the API changed since he wrote it in 2020 since.anchored(true)and.auto_configure(...)no longer exist.Note that this is a breaking change.