autocomplete on abra recipe upgrade is slow
#567
Closed
opened 2025-06-04 17:15:29 +00:00 by 3wordchant
·
9 comments
No Branch/Tag Specified
main
renovate/golang-1.27
renovate/github.com-charmbracelet-bubbletea-2.x
fix/492
local-integration-testing
renovate/github.com-charmbracelet-lipgloss-2.x
renovate/otel-weaver-0.x
renovate/codespell-2.x
renovate/tonistiigi-xx-1.x
renovate/alpine-3.x
renovate/github.com-charmbracelet-log-2.x
chore-deps
fix/deps
fix/613
0.13.0-beta
0.13.0-rc2-beta
0.13.0-rc1-beta
0.12.0-beta
0.11.0-beta
0.10.1-beta
0.10.0-beta
0.10.0-rc2-beta
0.10.0-rc1-beta
0.9.0-beta
0.8.1-beta
0.8.0-beta
0.8.0-rc2-beta
0.8.0-rc1-beta
0.7.0-beta
0.7.0-rc3-beta
0.7.0-rc2-beta
0.6.0-beta
0.5.1-beta
0.5.0-alpha
0.4.1-alpha
0.4.0-alpha
0.4.0-alpha-rc8
0.4.0-alpha-rc7
0.4.0-alpha-rc6
0.4.0-alpha-rc5
0.4.0-alpha-rc4
0.4.0-alpha-rc3
0.4.0-alpha-rc2
0.4.0-alpha-rc1
0.3.1-alpha-rc2
0.3.1-alpha-rc1
0.3.1-rc1
0.3.0-alpha
0.2.2-alpha
0.2.1-alpha
0.2.0-alpha
0.1.8-alpha
0.1.7-alpha
0.1.6-alpha
0.1.5-alpha
0.1.4-alpha
0.1.3-alpha
0.1.2-alpha
0.1.1-alpha
0.1.0-alpha
10.0.5
10.0.3
10.0.2
10.0.1
10.0.0
9.0.0
8.0.1
8.0.0
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
checkout
0.6.0
0.5.0
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
bug
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Abra v0.11.x
Done
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
decentral1se
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#567
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Not quite a "bug" but it does cause a little friction.
Autocomplete on recipe names is much slower than on app names. Probably because app autocomplete is based on listing files but recipe autocomplete is based on parsing JSON. Maybe there's nothing we can do but if it's possible to optimise it'd be awesome
CC @trav
Yeh I would love to speed this up also, I routinely get frozen waiting for this...
I think it might be doing some network activity in there somewhere....
Definitely something to improve!
When autocompleting recipe names, it first ensures the recipe catalogue is up to date. This makes it slower. We have the following options:
abra recipe upgrade <tab><tab>It only ensures onceThanks @p4u1 ! 🙏
#3 seems good, but maybe the most complex to implement – and it might be hard to avoid it being "first autocomplete invocation per shell".
#1 seems easiest but most fragile.
I am leaning towards #2 – but am I correct that we don't have a specific command to sync the recipe catalogue?
option 3 is actually quite easy to implement. This would also be the safest option, but it would still be slow on the first each time you run abra recipe upgrade
also you are correct that there is no command to sync the recipe catalogue. With option two would then need that i guess..
OK! Out of interest, how are you thinking abra would know whether to refresh the catalogue?
Thanks for thinking this one through! It might make sense to do a
abra catalogue syncand then make all catalogue operations local only? Then if you're missing something you expect to be there, you run a sync?This is all the places that
recipe.ReadRecipeCatalogue()is called, so it's quite significant and contributes to slowing things down. Also, we tried to get around this before by adding atrue/falseargument if it should only do an offline operation.One optimisation could be to check if
go-githas any way to remotely query the last modified value of the catalogue repository? Then you would know potentially faster if you need to actually do a full pull or not. I'm not sure this is provided and if it would offer a better experience in the "need to pull" case.Not sure on this one!
My proposal is option 2. I don't understand how option 3 would know how to only do it once and I am not much of a fan of doing some sort of bookkeeping to remember this. Please do let us know though if there is some way to manage it. Then, I would go for:
abra catalogue syncto update catalogueThis way, it's less automatic but should be faster for the day-to-day use. If you can't find it in the auto-complete, you know you should
abra catalogue sync. And the implementation should also make sure it pulls in the local recipe listing too (which I think it does).RFC: #604
I think #604 made a bit of an improvement for now!
Please re-open if there are still ways to improve it.