aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-06 17:27:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-06 17:27:56 +0000
commit65530572ad088c290b4eba463a38a4754560b002 (patch)
tree642db2604e14d0eb90fd20ad5bf19fcbdce9ecbb
parent3d41292de354ac973dce67c37cba059602ac68f4 (diff)
downloadpaludis-65530572ad088c290b4eba463a38a4754560b002.tar.gz
paludis-65530572ad088c290b4eba463a38a4754560b002.tar.xz
Slight performance tweaks
-rw-r--r--paludis/repositories/vdb/vdb_repository.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/paludis/repositories/vdb/vdb_repository.cc b/paludis/repositories/vdb/vdb_repository.cc
index f9f29ab..7c4c8d0 100644
--- a/paludis/repositories/vdb/vdb_repository.cc
+++ b/paludis/repositories/vdb/vdb_repository.cc
@@ -1063,9 +1063,14 @@ VDBRepository::provided_packages() const
try
{
- if (! e->metadata)
- _imp->load_entry(e);
- const std::string provide_str(e->metadata->get_ebuild_interface()->provide_string);
+ std::string provide_str;
+ if (e->metadata)
+ provide_str = e->metadata->get_ebuild_interface()->provide_string;
+ else
+ {
+ // _imp->load_entry(e); slow
+ provide_str = file_contents(_imp->location, e->name, e->version, "PROVIDE");
+ }
if (provide_str.empty())
continue;