Brock Pytlik wrote:

> https://cr.opensolaris.org/action/browse/pkg/bpytlik/performance

image.py:

  - You haven't changed the stripped file format, have you?

  - I'd like to see the key remain the last field in the offset file, for
    readability.

imageplan.py:

  - gen_only_new_installed_info (and others): docstring needs updating.

  - Did you look at simply rewriting __gen_star_actions_bytype() instead of
    creating __gen_star_actions_bytype_from_extant_manifests()?  I know
    there'll be ripple effects, but I feel like this probably just adds
    clutter to an already gigantic class.  You could have callers always
    pass in the correct excludes parameter (can you write a test case for
    19113?).

  - line 1575: use enumerate() instead?

  - line 1600: if you moved this test to the top of the loop and changed it
    to a ">", then you could invert the test on line 1580, and dedent the
    result of that test instead.

  - line 1757, 1763: since this is a performance wad anyway, why not use
    generator expressions here, rather than list comprehensions?

  - line 1782: I wonder if this weakrefdict should simply be a member of
    the PkgFmri class itself, as it seems like it would be useful in more
    places than just here.  The constructor could then use it directly.
    You might have some issues with some places wanting their own copy of
    the object, rather than a reference to an existing one, but if we had
    both mutable and immutable fmri objects, that might be easier.  And it
    would save on parsing time regardless.

pkg_solver.py:

  - line 139: why not a weakrefdict here, too?

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

Reply via email to