Rev 3807: Revert the changes to _sort_expand_and_combine in http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/remote_readv_sections

John Arbash Meinel john at arbash-meinel.com
Wed Oct 29 18:46:59 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/remote_readv_sections

------------------------------------------------------------
revno: 3807
revision-id: john at arbash-meinel.com-20081029184645-5kkxpg13cpyewc0w
parent: john at arbash-meinel.com-20081029180237-0ny6gh1punn3dcck
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remote_readv_sections
timestamp: Wed 2008-10-29 13:46:45 -0500
message:
  Revert the changes to _sort_expand_and_combine
  It isn't used for .pack files. Nor is it used for btree indexes.
-------------- next part --------------
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2008-10-29 18:02:37 +0000
+++ b/bzrlib/transport/__init__.py	2008-10-29 18:46:45 +0000
@@ -713,8 +713,6 @@
             offsets, in start-to-end order, with no duplicated regions,
             expanded by the transports recommended page size.
         """
-        # never make a single request larger than 1MB
-        max_length = 1*1024*1024
         offsets = sorted(offsets)
         # short circuit empty requests
         if len(offsets) == 0:
@@ -749,12 +747,9 @@
         current_finish = current_length + current_offset
         for offset, length in new_offsets[1:]:
             finish = offset + length
-            if (offset > current_finish
-                or (max_length and length + current_length > max_length)):
-                # there is a gap, or adding this section would create a range
-                # longer than max_length, either way, output the current
-                # accumulator and start a new one for the region we're
-                # examining.
+            if offset > current_finish:
+                # there is a gap, output the current accumulator and start
+                # a new one for the region we're examining.
                 offsets.append((current_offset, current_length))
                 current_offset = offset
                 current_length = length



More information about the bazaar-commits mailing list