<div dir="ltr">Brant, <div><br></div><div>I run profimp with and without patch <a href="https://review.openstack.org/#/c/164066/" target="_blank" style="font-size:12.8000001907349px">https://review.openstack.org/#/c/164066/</a>: </div><div>And it really works well: </div><div><br></div><div>before 170ms: </div><div><a href="http://boris-42.github.io/keystone/before.html">http://boris-42.github.io/keystone/before.html</a><br></div><div><br></div><div>after 76ms:</div><div><a href="http://boris-42.github.io/keystone/after.html">http://boris-42.github.io/keystone/after.html</a></div><div><br></div><div><br></div><div>Best regards,</div><div>Boris Pavlovic </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 3, 2015 at 2:44 AM, Monty Taylor <span dir="ltr"><<a href="mailto:mordred@inaugust.com" target="_blank">mordred@inaugust.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 04/02/2015 06:22 PM, Brant Knudson wrote:<br>
> On Thu, Apr 2, 2015 at 4:52 PM, Boris Pavlovic <<a href="mailto:boris@pavlovic.me">boris@pavlovic.me</a>> wrote:<br>
><br>
>> Hi stackers,<br>
>><br>
>> Recently, I started working on speeding up Rally cli.<br>
>><br>
>> What I understand immediately is that I don't understand why it takes<br>
>> 700-800ms<br>
>> to just run "rally version" command and it is impossible hard task to find<br>
>> what takes so much time just by reading the code.<br>
>><br>
>> I started playing with patching __import__ and make a simple but powerful<br>
>> tool<br>
>> that allows you to trace any imports and get pretty graphs of nested<br>
>> importing with timings:<br>
>><br>
>> <a href="https://github.com/boris-42/profimp" target="_blank">https://github.com/boris-42/profimp</a><br>
>><br>
>> So now it's simple to understand what imports take most of time, just by<br>
>> running:<br>
>><br>
>> profimp "import <lib>" --html<br>
>><br>
>><br>
>> Let's optimize OpenStack libs and clients?<br>
>><br>
>><br>
>> Best regards,<br>
>> Boris Pavlovic<br>
>><br>
>><br>
> There's a review in python-keystoneclient to do lazy importing of modules<br>
> here: <a href="https://review.openstack.org/#/c/164066/" target="_blank">https://review.openstack.org/#/c/164066/</a> . It would be interesting to<br>
> know if this improves the initial import time significantly. Also, this can<br>
> be an example of how to improve other libraries.<br>
<br>
</div></div>Yes please.<br>
<br>
Also - for libraries - let's try to not import lots of things.<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div>