I measured the time spent in the loop for pkg, state in pkgs_known:
With this webrev the time is 1.66 seconds. I reworked the fix to avoid the calling gtk.ListStore.remove(). The time spent in the loop is now 1.43 seconds. The webrev is at http://cr.opensolaris.org/~padraig/ips-6002-v2/. Padraig On 01/19/09 16:25, Michal Pryc wrote: > The webrev http://cr.opensolaris.org/~padraig/ips-6002-v1/ fixes > Bug 6002 Two entries appear in packagemanager for installed package > > The problem is that misc.get_inventory_list returns two entries when a > package is installed and a later update is available. > > In packagemanager if we find a "known" package followed by a package > with the same stem with "installed" state then we remove the first > package from the application list. > > Padraig, > What about performance? I see that you are doing > gtk.ListStore.remove() which is very time consuming, we are using > insert rather then append as this have quite big performance hit. > > Could you give some numbers ? > > best > Michal _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
