[openstack-dev] [all][oslo][clients] Let's speed up start of OpenStack libs and clients by optimizing imports with profimp
boris at pavlovic.me
Sun Apr 5 22:41:18 UTC 2015
I run profimp with and without patch
And it really works well:
On Fri, Apr 3, 2015 at 2:44 AM, Monty Taylor <mordred at inaugust.com> wrote:
> On 04/02/2015 06:22 PM, Brant Knudson wrote:
> > On Thu, Apr 2, 2015 at 4:52 PM, Boris Pavlovic <boris at pavlovic.me>
> >> Hi stackers,
> >> Recently, I started working on speeding up Rally cli.
> >> What I understand immediately is that I don't understand why it takes
> >> 700-800ms
> >> to just run "rally version" command and it is impossible hard task to
> >> what takes so much time just by reading the code.
> >> I started playing with patching __import__ and make a simple but
> >> tool
> >> that allows you to trace any imports and get pretty graphs of nested
> >> importing with timings:
> >> https://github.com/boris-42/profimp
> >> So now it's simple to understand what imports take most of time, just by
> >> running:
> >> profimp "import <lib>" --html
> >> Let's optimize OpenStack libs and clients?
> >> Best regards,
> >> Boris Pavlovic
> > There's a review in python-keystoneclient to do lazy importing of modules
> > here: https://review.openstack.org/#/c/164066/ . It would be
> interesting to
> > know if this improves the initial import time significantly. Also, this
> > be an example of how to improve other libraries.
> Yes please.
> Also - for libraries - let's try to not import lots of things.
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev