Beehive ate my previous attempt at sending this mail apparently. -------- Forwarded Message -------- From: Tim Foster <[email protected]> To: Danek Duvall <[email protected]> Cc: [email protected] Subject: Re: [pkg-discuss] Code review: make pkglint deterministic Date: Fri, 07 Jan 2011 18:34:41 +1300
On Thu, 2011-01-06 at 15:09 -0800, Danek Duvall wrote: > Tim Foster wrote: > > http://cr.opensolaris.org/~timf/pkglint-deterministic-webrev Thanks for the review. > I don't know that it matters much here, but I would bet that sorting > strings is faster than sorting objects, so something like > > [f.get_fmri() for f in sorted(fmris)] > > is probably better written as > > sorted((f.get_fmri() for f in fmris)) Yes. I ran a few tests earlier, sorting large lists of FMRIs - it does seem to be a bit better, 3 seconds faster against a list of 100,000 PkgFmri objects on my machine. Hopefully pkglint never has to produce an error message of that magnitude :-) For more complex objects, it might matter more of course. It's a simple change though, so I included it. > Also, in pkglint_manifest.py, in the first hunk, you treat > undefined_variants and unknown_variants differently -- the first gets an > explicit list and the latter doesn't. Fixed that, thanks. > Looks fine otherwise. cool, cheers, tim _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
