On my system, each completion invocation takes approximately 10.6 seconds because importing the CLI unconditionally initializes a PostHog background worker and completions invoke the comfy command twice. Suppressing PostHog reduces completion to roughly 0.8 seconds because the CLI is executed twice.
IDK if the fact that I have strict DNS blocking is what’s causing posthog to take the full 5s each time, but it seems possible
Therefore, there appear to be two related performance problems:
- Shell completion invokes the entire CLI twice per completion attempt.
- CLI startup eagerly initializes telemetry and other command infrastructure that completion does not need.
Analytics are disabled in my configuration, which makes the unconditional PostHog initialization additionally surprising.
Environment
- comfy-cli: 1.12.0
- Shell: Fish
- OS: Linux
- Analytics disabled in the Comfy configuration
- DNS-level tracking-domain blocking is enabled
Reproduction
Compare an ordinary invocation of tabbing for a completion in fish shell then:
It’s still kinda slow but it’s way more usable when you don’t post your hog each completion (~10s reduced to ~1s)
On my system, each completion invocation takes approximately 10.6 seconds because importing the CLI unconditionally initializes a PostHog background worker and completions invoke the comfy command twice. Suppressing PostHog reduces completion to roughly 0.8 seconds because the CLI is executed twice.
IDK if the fact that I have strict DNS blocking is what’s causing posthog to take the full 5s each time, but it seems possible
Therefore, there appear to be two related performance problems:
Analytics are disabled in my configuration, which makes the unconditional PostHog initialization additionally surprising.
Environment
Reproduction
Compare an ordinary invocation of tabbing for a completion in fish shell then:
It’s still kinda slow but it’s way more usable when you don’t post your hog each completion (~10s reduced to ~1s)