Hi, the following patch improves the population of the package table in the graphical "OSCAR Package Selector". from taking a 10's of seconds without the patch it improves to near instant with the patch. to achieve this speedup it does not show the package version in the table anymore.
what do you think ? kind regards Thilo
Index: SelectorTable.pm =================================================================== --- SelectorTable.pm (revision 8678) +++ SelectorTable.pm (working copy) @@ -306,9 +306,10 @@ my ($location, $version); require OSCAR::RepositoryManager; + my $rm = OSCAR::RepositoryManager->new (distro=>$distro); + my @core_opkgs = OSCAR::Opkg::get_list_core_opkgs (); foreach my $opkg (@available_opkgs) { - my $rm = OSCAR::RepositoryManager->new (distro=>$distro); - my ($rc, %opkg_data) = $rm->show_opkg ("opkg-$opkg"); +# my ($rc, %opkg_data) = $rm->show_opkg ("opkg-$opkg"); setNumRows($rownum+1); @@ -328,7 +329,6 @@ setItem($rownum, 2, $item); # Column 3 contains the "class" of packages - my @core_opkgs = OSCAR::Opkg::get_list_core_opkgs (); my $opkg_class; if (OSCAR::Utils::is_element_in_array ($opkg, @core_opkgs) == 1) { $opkg_class = "Core"; @@ -341,11 +341,11 @@ setItem($rownum,3,$item); # Column 4 contains the Location + Version - $location = $opkg_data{"opkg-$opkg"}{repository}; - $version = $opkg_data{"opkg-$opkg"}{version}; - $item = SelectorTableItem(this,Qt::TableItem::Never(), - $location . " " . $version); - setItem($rownum,4,$item); +# $location = $opkg_data{"opkg-$opkg"}{repository}; +# $version = $opkg_data{"opkg-$opkg"}{version}; +# $item = SelectorTableItem(this,Qt::TableItem::Never(), +# $location . " " . $version); +# setItem($rownum,4,$item); $rownum++; }
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Oscar-users mailing list Oscar-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-users