[merge] Knit caches that overflow to disk
John Arbash Meinel
john at arbash-meinel.com
Tue Jul 18 01:03:20 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Attached is a patch which introduces a 'DiskBackedCache' class.
Basically it is a dict that maps to strings, and if the target data gets
too big, it optionally starts writing to disk (either that or not
caching any more data).
The use case is that we need to read the inventory before we know what
file texts to merge, but we don't want to read the inventory a second
time when we actually install the text locally. People using big trees
were concerned about excessive memory consumption. So if the tree is
local, it just stops caching new reads, and if the tree is remote it
starts writing to a temporary file.
I don't know if this will make it into 0.9. Lifeless has a reasonably
valid concern that it is not the best way to handle memory consumption.
But I figured I can put the patch up for review, and interested parties
can take it further if they so desire.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v184.108.40.206 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 20102 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060717/e2b68b59/attachment.bin
More information about the bazaar