Dan Price wrote:
> On Sun 07 Sep 2008 at 07:56PM, Shawn Walker wrote:
>> webrev:
>> http://cr.opensolaris.org/~swalker/pkg-3166-3306/
>>
>> Change Summary:
>> * Changed modules/server/feed.py:add_transaction() to cache the result 
>> of Catalog.fmris() method to prevent repeated disk I/O.  This cut the 
>> cache generation time for an snv96 repository from 2+ unknown hours to 
>> 51 seconds.
> 
> 51 seconds is an age.  Espectially given that we can do 'pkg list' (with
> it's expensive computation) in less than one second.  Where's the
> remaining hot spot in this code?

The hot spot here is determining whether each entry is an update or an 
addition to the repository since the updatelog doesn't indicate that.

Specifically, add_transaction() in feed.py uses extract_matching_fmris() 
to find all the matching fmris and sees if the current fmri matches the 
oldest one.  If it doesn't, then it knows it's an update and not an 
addition.

However, caching extract_matching_fmris() results doesn't help -- I 
already checked (+/- 2 second difference).

I think we're going to have to live with the 51 seconds for now unless 
we can either 1) speed up extracthing_matching_fmris() or 2) change the 
updatelog to indicate whether something is an addition or an update.

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

Reply via email to