On Mon, Apr 13, 2015 at 5:20 PM, Doug Hellmann <[email protected]> wrote:
> 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... dt -- Dean Troyer [email protected]
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
