donnemartin / saws

A supercharged AWS command line interface (CLI).
Other
5.24k stars 281 forks source link

Scan for resources in the background #27

Open cristim opened 8 years ago

cristim commented 8 years ago

At the moment saws is scanning the resources at startup, which slows down the start process.

That could be done on a different thread, so the data would be populated in the background and maybe also in parallel for multiple services, without blocking the UI.

donnemartin commented 8 years ago

Hi Cristian,

Good idea, thanks for suggesting it.

Currently the startup scan is done only if the cache doesn't exist (ie first run). Afterwards the load is much quicker, unless you force a refresh with F5.

I like the idea of updating the resources in a background thread to speed things up and maybe keep help keep the resources fresh without an F5.

-Donne

cristim commented 8 years ago

I'm juggling between about a dozen of AWS accounts, for which I have defined credential profiles in ~/.aws, so for me the cache would need to be split on a per-account basis.

Some of them are not used very often and the cache would soon become obsolete, so I see some value in having it updated on each start, which would be great to be done in the background.

donnemartin commented 8 years ago

Interesting, thanks for providing more details about your use case.

AnthonyWC commented 7 years ago

+1 on skipping resources scanning in the beginning; also I don't think caching is working for me (on python 3.5). Where is the cache stored?