task icon indicating copy to clipboard operation
task copied to clipboard

Completions have become significantly slower starting from 3.44.0

Open vctls opened this issue 1 month ago • 4 comments

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


vctls avatar Nov 20 '25 09:11 vctls

Is task slow from the CLI with --silent --list-all options?

trulede avatar Nov 20 '25 17:11 trulede

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 avatar Nov 20 '25 19:11 vmaerten

@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.

trulede avatar Nov 23 '25 17:11 trulede

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.

vctls avatar Nov 24 '25 17:11 vctls

It will be available in the next release

vmaerten avatar Dec 12 '25 21:12 vmaerten