[openstack-dev] [openstackclient] osc slowness

Dean Troyer dtroyer at gmail.com
Mon Apr 13 23:41:37 UTC 2015

On Mon, Apr 13, 2015 at 5:20 PM, Doug Hellmann <doug at doughellmann.com>

> Excerpts from Sean Dague's message of 2015-04-13 07:15:57 -0400:
> I *believe* the time is scanning the plugins. It doesn't actually
> load them, but it has to look through all of the entry point
> registries to find what commands are available. I originally built
> cliff (the framework under OSC) this way because I thought we would
> put the commands in separate repositories.

FWIW, as things grow commands for projects outside layers 1 & some of 2 are
in external repos.  The some of time here is due to doing all imports up
front rather than as required; I've proposed
https://review.openstack.org/173098 as the first step to fix this.

> Since we aren't doing that for the vast majority of them, we can
> change the implementation of cliff to support hard-coded commands
> more easily, and to have it only scan the entry points for commands
> that aren't in that hard-coded list. We would need to load them all
> to generate help output and the tab-completion instructions, but I
> think it's OK to take a bit of a penalty in those cases.

If we do the above the entry point scan is maybe two orders of magnitude
faster without the forced imports.

I am also working on at least one deferred import inside cliff itself, cmd2
is pokey...



Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150413/dc1e94f8/attachment.html>

More information about the OpenStack-dev mailing list