Open o-l-a-v opened 3 months ago
Thank you for opening this issue, we will look into it.
Here's a quick test for getting latest version of bastion
using Azure CLI v2.63.0, vs fetching index.json
from this GitHub repo.
CLI takes about 6-7 seconds, while getting index.json
from this GitHub repo then parse out the relevant information takes about 0.25-0.40 seconds.
Making this quicker can speed up all commands that needs to fetch index.json
to find out what version is the latest, what version to install etc.
Describe the bug
az extension list-available
is super slow, it takes seconds just to fetchindex.json
fromhttps://aka.ms/azure-cli-extension-index-v1
. Most likely because it's stored on a single region Azure storage account, blob storage. Related to:Here are some ideas to make it faster:
index.json
in the main branch?index.json
: We're usually only interested in knowing what's the latest version available. Create aindex-latest.json
with just the latest stable and preview version?index.json
will just continue growing.index.json
locally, don't attempt to refetch it every CLI command that needs it.index.json
after 15 minutes?index.json
, then Azure CLI can check local cached version vs. what's available. Which should be much faster than fetchingindex.json
. Use GitHub releases?Related command
Errors
None
Issue script & Debug output
None
Expected behavior
Would be nice it if was faster
Environment Summary
Azure CLI v2.43.0
Additional context
No response