awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.17k stars 772 forks source link

Run doc index in background. #23

Closed jamesls closed 8 years ago

jamesls commented 8 years ago

Addresses part of #1.

This doesn't run the autocomplete indexing in the background, only the doc indexer. I think this is the biggest win right now because they take a long time to complete.

The basic idea is to run the doc indexer in another thread, and use a concurrent dbm to coordinate access to the dbm.

The nice thing about this approach is that the indexing is incremental and you can start to look up documentation as soon as the docs for a particular command are available. You don't have to wait until the entire documentation process is finished.

Below is this feature in action. Notice at first how there are no ec2 docs are available, but if I pick autoscaling the docs are available because they get generated first.

The doc index is going to need a overhaul soon (it doesn't work on windows) so I tried to avoid making any changes to that module for now.

background-doc-index

kyleknap commented 8 years ago

Looks good for now. :ship:

jamesls commented 8 years ago

Cool, merged.