Skip to content

Conversation

@morags
Copy link

@morags morags commented Oct 10, 2025

Summary

Generating uv and uvx's autocompletions can take over half a second on even a moderately fast system, while loading pre-prepared files can be two orders of magnitude faster. This commit provides users with a general-purpose technique for generating autocompletion files offline, which could contribute to significantly faster shell startup times.

Test Plan

Documentation change - manual testing

@zanieb
Copy link
Member

zanieb commented Oct 10, 2025

Hm it only takes 5ms on my machine, you're seeing half a second? That seems way too slow.

Separately, this might be nice to have but doesn't seem appropriate for our installation guide — it's too detailed. We'll want to find somewhere else for it, e.g., in the Reference, but I'm not sure where would be best yet.

@morags
Copy link
Author

morags commented Oct 15, 2025

~300ms after some upgrades, yes. Then the cache kicks in and subsequent runs are much faster, but obviously only the first one matters.

I know it's general-purpose, but uv is the main culprit in my scenario, hence the uv docs. In the meanwhile I put it in its own gist, in case it doesn't fit here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants