Merge lp:~flimm/epidermis/redesign into lp:epidermis

Proposed by David D Lowe
Status: Merged
Approved by: David D Lowe
Approved revision: 44
Merge reported by: David D Lowe
Merged at revision: 26
Proposed branch: lp:~flimm/epidermis/redesign
Merge into: lp:epidermis
To merge this branch: bzr merge lp:~flimm/epidermis/redesign
Reviewer Review Type Date Requested Status
David D Lowe Approve
Review via email: mp+1162@code.launchpad.net

Commit message

This should be the 0.1beta version.

To post a comment you must log in.
Revision history for this message
David D Lowe (flimm) :
review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :
Download full text (21.6 KiB)

Little bit of fiddling later: this is a diff from an updated copy of
Johns branch. I'm pushing that to ~lifeless/bzr/bug-420652.

-Rob

=== modified file 'NEWS'
--- NEWS 2009-09-03 23:43:16 +0000
+++ NEWS 2009-09-04 00:48:39 +0000
@@ -33,6 +33,13 @@
 * Don't restrict the command name used to run the test suite.
   (Vincent Ladeuil, #419950)

+* Fetches from 2a to 2a are now again requested in 'groupcompress'
order.
+ Groups that are seen as 'underutilized' will be repacked on-the-fly.
+ This means that when the source is fully packed, there is minimal
+ overhead during the fetch, but if the source is poorly packed the
result
+ is a fairly well packed repository (not as good as 'bzr pack' but
+ good-enough.) (Robert Collins, John Arbash Meinel, #402652)
+
 * Network streams now decode adjacent records of the same type into a
   single stream, reducing layering churn. (Robert Collins)

@@ -109,6 +116,7 @@
 * The main table of contents now provides links to the new Migration
Docs
   and Plugins Guide. (Ian Clatworthy)

+
 bzr 2.0rc1
 ##########

=== modified file 'bzrlib/groupcompress.py'
--- bzrlib/groupcompress.py 2009-08-30 21:34:42 +0000
+++ bzrlib/groupcompress.py 2009-09-04 00:45:56 +0000
@@ -457,7 +457,6 @@
                 # There are code paths that first extract as fulltext,
and then
                 # extract as storage_kind (smart fetch). So we don't
break the
                 # refcycle here, but instead in
manager.get_record_stream()
- # self._manager = None
             if storage_kind == 'fulltext':
                 return self._bytes
             else:
@@ -469,6 +468,14 @@
 class _LazyGroupContentManager(object):
     """This manages a group of _LazyGroupCompressFactory objects."""

+ _max_cut_fraction = 0.75 # We allow a block to be trimmed to 75% of
+ # current size, and still be considered
+ # resuable
+ _full_block_size = 4*1024*1024
+ _full_mixed_block_size = 2*1024*1024
+ _full_enough_block_size = 3*1024*1024 # size at which we won't
repack
+ _full_enough_mixed_block_size = 2*768*1024 # 1.5MB
+
     def __init__(self, block):
         self._block = block
         # We need to preserve the ordering
@@ -546,22 +553,23 @@
         # time (self._block._content) is a little expensive.
         self._block._ensure_content(self._last_byte)

- def _check_rebuild_block(self):
+ def _check_rebuild_action(self):
         """Check to see if our block should be repacked."""
         total_bytes_used = 0
         last_byte_used = 0
         for factory in self._factories:
             total_bytes_used += factory._end - factory._start
- last_byte_used = max(last_byte_used, factory._end)
- # If we are using most of the bytes from the block, we have
nothing
- # else to check (currently more that 1/2)
+ if last_byte_used < factory._end:
+ last_byte_used = factory._end
+ # If we are using more than half of the bytes from the block,
we have
+ # nothing else to check
         if total_bytes_used * 2 >= self._block._content_length:
- return
- # Can we just str...

Subscribers

People subscribed via source and target branches

to all changes: