Brock Pytlik wrote:
> General comments:
> Could you please update the bugs with the analysis you've done here and
> your answers to Padraig's questions? I think that would be helpful.
Brock,
I have updated all bugs together with some DTrace measuring. I did use 
my script to limit measured function to __get_image_from_directory(), as 
this was the main change. The results are attached to bug description.

> I'm not quite sure where the speedup is coming from in lines 1470-1505.
> Is it because pkgs_known becomes a much smaller list? I'd be interested
> in seeing the output of /opt/DTT/Python/py_calltime or py_cputime to see
> where the speed up is happening, and where the continuing bottle necks are.
Please see the results attached to bug:
http://defect.opensolaris.org/bz/show_bug.cgi?id=5150

We can see that the biggest bottle neck is in the call to the inventory 
from image.py.

Another bottle neck which is not in the output from dtrace as this was 
not improved is in the call in the image.load_catalogs(), but it is 
something to address in another thread/bug.

> Lines 1470-1505: I'd rather this code wasn't copied, we've been down
> that road before. If the gui needs it as well, then I'd suggest
> promoting it and placing it in either misc or api.py. Which one, I don't
> really feel strongly about.
Before we were using the call:

pkgs_known = [ pf[0] for pf in sorted(api_o.img.inventory(all_known = 
True)) ]

I found the sort function from client.py ~1second faster for 22000 fmris 
that is why I did use it instead of calling sorted(). Also this doesn't 
need the logic of grouping the packages by calling the:
def check_if_pkg_have_row_in_model(pkg, p_pkg)

actually I should remove this function from packagemanager.py as well 
from this webrev as it is not used anymore.

I don't think moving this to the api or image at this point is something 
good as we should start defining the proper functions for getting list 
of packages and once this will happen the from 1470-1505 code will be 
gone, but now it is needed to simplify the logic of the function.

> nits:
> 956: please indent this correctly
Will do and propose new webrev.

best
Michal

>
> Michal Pryc wrote:
>> Padraig O'Briain wrote:
>>> I had a few questions and I sat with Michal and got answers for them.
>>>
>>> Q. What changes were made for 4341?
>>> A. The use of state is get_image_from_directory ensure that GUI results
>>> are the same as CLI results
>>>
>>> Q. How is the same package being in more than one authority handled?
>>> A. The use of pkg_stem ensures that we have separate rows for the two
>>> packages.
>>>
>>> One minor nit:
>>> The assignment of default_auth in update_package_list is not necesary as
>>> it is unused.
>> Padraig,
>> Thanks, the webrev with fix for minor nit:
>>
>> http://cr.opensolaris.org/~migi/05_12_2008_bug5645_5289_4341_5150_v1
>>
>> Michal
>>
>>> Padraig
>>>
>>>
>>> On 12/05/08 11:31, Michal Pryc wrote:
>>>> Hello,
>>>> The webrev is at:
>>>> http://cr.opensolaris.org/~migi/05_12_2008_bug5645_5289_4341_5150/
>>>>
>>>> Fixes:
>>>> 1.
>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5645
>>>> Package Manager should have busy cursor for certain actions
>>>>
>>>> 2.
>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5289
>>>> Package Manager do not respect the same packages from non default
>>>> authorities
>>>>
>>>> 3.
>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=4341
>>>> IPS GUI and CLI list different status for some packages
>>>>
>>>> 4.
>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5150
>>>> PM loading of package entries takes too long
>>>>
>>>> The 4. is partialy fixed. The time is reduced on my machine from:
>>>>
>>>> After __init__ : 0.31704211235
>>>> Call to load_catalogs: 10.3101949692
>>>> Enter get_list func: 10.3106389046
>>>> After call to sort: 17.8955469131
>>>> Return get_list func: 39.3143429756
>>>>
>>>> As we can see the total time before was 39 seconds for returing from
>>>> the get_list func which is basically the last func for startup.
>>>>
>>>> The new times (proposed in this webrev):
>>>>
>>>> After __init__: 0.258629083633
>>>> Call to load_catalogs: 10.1712219715
>>>> Enter get_list func: 10.171653986
>>>> After call to sort: 15.8203570843
>>>> Return get_list func: 17.8212211132
>>>>
>>>> As we can see we are up and running in 17.8 sec which is ~45% of the
>>>> time spend before improvements. The bottle neck is the call to
>>>> img.load_catalogs() which is more then 60% of the time for the startup.
>>>>
>>>> best
>>>> Michal
>>> _______________________________________________
>>> pkg-discuss mailing list
>>> [email protected]
>>> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
>>
>> _______________________________________________
>> pkg-discuss mailing list
>> [email protected]
>> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
>

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to