[MERGE] Don't buffer inventory lines during autopack

John Arbash Meinel john at arbash-meinel.com
Sat Mar 8 09:39:01 GMT 2008


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

The current pack code was written to extract inventory lines while
copying. This makes sense when we are copying a subset of the
repository, so that we know what texts to copy along with.

However, when we are doing an autopack, we just merge everything
together. (We don't filter history). The existing code would still
generate those lines, buffer them into a single list, and then throw
them away.

This patch just changes it so that if we won't use the inventory lines,
we just don't generate them. It should reduce CPU consumption because we
aren't extracting the lines, and reduce memory consumption dramatically
on large repositories. (On the OOo conversion, I quickly reached >1GB of
memory, while with this patch autopack stayed <300MB.)

If there is some other side-effect of extracting the lines, we can leave
it in and just change:

list(inv_lines)

to

for line in inv_lines:
  pass # ignore it

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH0l61JdeBCYSNAAMRAi0QAKCFoE8tIy57s2Is1LilldreqpJU0gCcClzQ
z3f7krAOWicQ1KP12avFwOg=
=Q5sQ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autopack.patch
Type: text/x-diff
Size: 4220 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080308/ba3c70b4/attachment-0001.bin 


More information about the bazaar mailing list