[MERGE] Reduce index query pressure for text construction by batching the individual queries into single batch queries.

John Arbash Meinel john at arbash-meinel.com
Fri Feb 8 19:06:16 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
| This not-quite-trivial change pushes the index queries made to build
| texts down into each knit index layer, reducing the number of queries by
| 2 (method + parents + location -> one query) and also batches all the
| requested components into a single query rather than
| one-loop-per-text-being-built, which will help things like 'extract two
| inventories'.
|
| -Rob
|

I was planning on doing something just like this for annotate, thanks
for beating me to it.

There are 2 small issues still.

1) You didn't actually add any tests for _KnitIndex.get_build_details, I
realize it isn't strictly required since we consider them private
classes, but it does seem worthwhile to ensure that the api doesn't
change without notice.

2) For annotations, I need the compression parent to build the
full-texts, but I also need the logical parent to build the annotations.
Since we are considering splitting the two, would it be possible to have
'get_build_details' return both?

BB:tweak

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHrKgoJdeBCYSNAAMRAlHoAJ9Tgaepi5IQ88LFrnoLTcnh8vTAcwCdHxKB
og11hrVQ/9eHhi5r7EovdF0=
=IhM+
-----END PGP SIGNATURE-----



More information about the bazaar mailing list