From 65b3487282e04759e8339875963b4403b690cc2c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 6 Jan 2009 16:55:46 +0000 Subject: warn traverse() is costly --- Rpmdrake/pkg.pm | 1 + Rpmdrake/rpmnew.pm | 1 + 2 files changed, 2 insertions(+) (limited to 'Rpmdrake') diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index be2ed7fb..de890e26 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -325,6 +325,7 @@ sub get_installed_packages { $base{$_} = \$n; } } + # costly: $db->traverse(sub { my ($pkg) = @_; update_pbar($gurpm); diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm index 2e0d1971..2545e5cd 100644 --- a/Rpmdrake/rpmnew.pm +++ b/Rpmdrake/rpmnew.pm @@ -189,6 +189,7 @@ sub do_merge_if_needed() { my %pkg2rpmnew; my $wait = wait_msg(N("Please wait, searching...")); print "Searching .rpmnew and .rpmsave files...\n"; + # costly: open_rpm_db()->traverse(sub { my $n = my_fullname($_[0]); $pkg2rpmnew{$n} = [ grep { m|^/etc| && (-r "$_.rpmnew" || -r "$_.rpmsave") } map { chomp_($_) } $_[0]->files ]; -- cgit v1.2.1