-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching choices for choices completer #136
Comments
Thanks for the suggestion. How would you envision this cache working? |
So this seems only relevant to the ChoicesCompleter to me, it would have an additional Assuming #138 gets merged one could hook up writing and loading to a file (name provided by https://pypi.python.org/pypi/appdirs/ ideally to be platform independent) to the |
What would the cache key and expiration strategy be? |
Not sure indeed about this one. The user of the library should definitely be able to influence that behaviour because it'll be tied to his needs. |
OK. You're not the first person who requested this :) I'm going to think about this some more. So far I'm leaning toward building caching into CompletionFinder, not Completer, and using the full command line as the key. There are quite a few design chocies to make in how the cache should behave, especially in making sure it doesn't make the completions slower in pathological cases like slow cache I/O. |
Hi,
we use argcomplete in coala (coala-analyzer.org) and getting possible values for one of our completers is actually something that takes about .5 seconds on decent systems. It would be nice if argcomplete would have a way to cache completions so that the experience of the user. Possibly you want the ability to mark a completion as not cached if it depends on others e.g.
The text was updated successfully, but these errors were encountered: