Rev 2890: Cleanup the dense_lines parameter docstring to be more useful. in http://people.ubuntu.com/~robertc/baz2.0/knits
Robert Collins
robertc at robertcollins.net
Fri Oct 5 04:04:36 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/knits
------------------------------------------------------------
revno: 2890
revision-id: robertc at robertcollins.net-20071005030427-835quoopdu6adviv
parent: robertc at robertcollins.net-20071004223027-e92ucdpgeh0s67g4
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knits
timestamp: Fri 2007-10-05 13:04:27 +1000
message:
Cleanup the dense_lines parameter docstring to be more useful.
modified:
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py 2007-10-04 22:30:27 +0000
+++ b/bzrlib/knit.py 2007-10-05 03:04:27 +0000
@@ -1998,7 +1998,12 @@
def _record_to_data(self, version_id, digest, lines, dense_lines=None):
"""Convert version_id, digest, lines into a raw data block.
- :param dense_lines: The bytes of lines but in a denser form.
+ :param dense_lines: The bytes of lines but in a denser form. For
+ instance, if lines is a list of 1000 bytestrings each ending in \n,
+ dense_lines may be a list with one line in it, containing all the
+ 1000's lines and their \n's. Using dense_lines if it is already
+ known is a win because the string join to create bytes in this
+ function spends less time resizing the final string.
:return: (len, a StringIO instance with the raw data ready to read.)
"""
# Note: using a string copy here increases memory pressure with e.g.
More information about the bazaar-commits
mailing list