diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-06-05 13:51:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-06-05 13:51:23 +0000 |
commit | 03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4 (patch) | |
tree | c4f564b9c7cf962849d082ab680417f2e05fbb3e | |
parent | 7e72ea3b0c121881e7a252aa1652235af6aa05c2 (diff) | |
download | rpmdrake-03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4.tar rpmdrake-03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4.tar.gz rpmdrake-03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4.tar.bz2 rpmdrake-03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4.tar.xz rpmdrake-03c61d357d2cefac2c8d1c295f993ad9a9ed6ec4.zip |
(do_search) limit the number of results to 2000, else Gtk2::TreeView
takes quite a lot of time in order to render the lsit (#30355)
-rwxr-xr-x | rpmdrake | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -135,7 +135,12 @@ sub do_search($$$$$$$) { $searchw->destroy; } } else { - @search_results = grep { $_ =~ $entry_rx } @filtered_pkgs; + my $count; + foreach (@filtered_pkgs) { + next if !/$entry_rx/; + push @search_results, $_; + last if $count++ > 2000; + } } if (@search_results) { $options->{add_nodes}->(map { [ $_, N("Search results") . ($options->{tree_mode} eq 'by_presence' |