Completions have become significantly slower starting from 3.44.0
Description
I have generated taskfiles with a lot of tasks (several hundreds) that I specifically use for auto-completion. When switching from v3.43.3 to 3.44.0, completion time has gone up from around 1 second to around 3 or 4 seconds. I tried with fish and bash, they are both slower. The problem appeared in 3.44.0 and is still present in 3.45.5.
Maybe having hundreds of tasks is not really an intended use case? I'll take alternative suggestions.
Version
3.45.5
Operating system
Ubuntu 24.4
Experiments Enabled
No response
Example Taskfile
Is task slow from the CLI with --silent --list-all options?
I suspect the fuzzy matcher. I’ve opened a draft where it’s disabled. Can you test it?
go install github.com/go-task/task/v3/cmd/task@fix-disable-fuzzy
We may want to consider adding an option to disable it.
@vmaerten AFAICS the fuzzy model is only used (to generate a list of suggestions) when the specified task cannot be found. An alternative to your suggestion would be to relocate the code that builds the fuzzy match to the point where it is used.
That removes it, and its associated performance hit, from the "normal" program flow.
I suspect the fuzzy matcher. I’ve opened a draft where it’s disabled. Can you test it?
go install github.com/go-task/task/v3/cmd/task@fix-disable-fuzzy
This is indeed much faster than the latest version.
It will be available in the next release