Comment about avoiding expensive metadata pulls
authorZac Medico <zmedico@gentoo.org>
Wed, 10 Oct 2007 08:07:00 +0000 (08:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 10 Oct 2007 08:07:00 +0000 (08:07 -0000)
in depgraph.select_dep().

svn path=/main/trunk/; revision=8038

pym/emerge/__init__.py

index 7f4159ea98917d050b867008dbc225cb1b1f80df..123e8683c7bcf06c124a3e3685a6e642dce1ec69 100644 (file)
@@ -2065,6 +2065,12 @@ class depgraph(object):
                                                                        old_use, iuses,
                                                                        now_use, cur_iuse):
                                                                        break
+                                                       # Metadata accessed above is cached internally by
+                                                       # each db in order to optimize visibility checks.
+                                                       # Now that all possible checks visibility checks
+                                                       # are complete, it's time to pull the rest of the
+                                                       # metadata (including *DEPEND). This part is more
+                                                       # expensive, so avoid it whenever possible.
                                                        metadata.update(izip(self._mydbapi_keys,
                                                                db.aux_get(cpv, self._mydbapi_keys)))
                                                        if not built: