aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2008-12-04 19:35:40 -0500
committerAvatar Mike Kelly <pioto@pioto.org> 2008-12-04 19:35:40 -0500
commiteb990ebbb519b7363e2a4e9d999339677743cd3d (patch)
tree10fd597d82618661c81152c232ec4d6940724415
parentfe2acbbfa936d6593e4456c373cfe4f433dc0c4f (diff)
downloadpaludis-eb990ebbb519b7363e2a4e9d999339677743cd3d.tar.gz
paludis-eb990ebbb519b7363e2a4e9d999339677743cd3d.tar.xz
Speed up Layout::package_names()
This provides a reasonable speedup for paludis --list-packages and cave print-packages.
-rw-r--r--paludis/repositories/e/exheres_layout.cc4
-rw-r--r--paludis/repositories/e/traditional_layout.cc6
2 files changed, 3 insertions, 7 deletions
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 39673f5..db7ef3d 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -374,9 +374,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
if (! d->is_directory_or_symlink_to_directory())
continue;
- if (DirIterator() == std::find_if(DirIterator(*d), DirIterator(),
- std::tr1::bind(&ERepositoryEntries::is_package_file, _imp->entries.get(),
- c + PackageNamePart(d->basename()), _1)))
+ if (d->basename() == "CVS")
continue;
_imp->package_names.insert(std::make_pair(c + PackageNamePart(d->basename()), false));
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 05dcbbf..553dd3d 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -384,10 +384,8 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
if (! d->is_directory_or_symlink_to_directory())
continue;
- if (DirIterator() == std::find_if(DirIterator(*d, DirIteratorOptions() + dio_inode_sort), DirIterator(),
- std::tr1::bind(&ERepositoryEntries::is_package_file, _imp->entries.get(),
- c + PackageNamePart(d->basename()), _1)))
- continue;
+ if (d->basename() == "CVS")
+ continue;
_imp->package_names.insert(std::make_pair(c + PackageNamePart(d->basename()), false));
}