Skip to content

Annotation function being called every time a different candidate is selected? #1040

Closed Answered by minad
edgar-vincent asked this question in Q&A
Discussion options

You must be logged in to vote

I am using Consult for a personal project which requires annotations generated from a Web API call. When I use Vertico, which you might be aware of ^^, and enable the annotations, I find that switching annotated candidates back and forth is very slow, as though they were being regenerated at every movement, despite the fact that they are all already visible. I suppose this is because it is expected that the annotations can be dynamic.

Yes, Vertico loads annotations of all visible candidates on each redisplay. The expectation is that annotation functions are sufficiently fast. I've implemented caching in the Marginalia package, which helps there for some of the more expensive computations.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@edgar-vincent
Comment options

Answer selected by minad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants