1. 20 2月, 2006 4 次提交
  2. 18 2月, 2006 1 次提交
    • J
      pack-objects: avoid delta chains that are too long. · e4c9327a
      Junio C Hamano 提交于
      This tries to rework the solution for the excess delta chain
      problem. An earlier commit worked it around ``cheaply'', but
      repeated repacking risks unbound growth of delta chains.
      
      This version counts the length of delta chain we are reusing
      from the existing pack, and makes sure a base object that has
      sufficiently long delta chain does not get deltified.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e4c9327a
  3. 17 2月, 2006 6 次提交
    • J
      git-repack: allow passing a couple of flags to pack-objects. · cec2be76
      Junio C Hamano 提交于
      A new flag -q makes underlying pack-objects less chatty.
      A new flag -f forces delta to be recomputed from scratch.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cec2be76
    • J
      pack-objects: finishing touches. · ca5381d4
      Junio C Hamano 提交于
      This introduces --no-reuse-delta option to disable reusing of
      existing delta, which is a large part of the optimization
      introduced by this series.  This may become necessary if
      repeated repacking makes delta chain too long.  With this, the
      output of the command becomes identical to that of the older
      implementation.  But the performance suffers greatly.
      
      It still allows reusing non-deltified representations; there is
      no point uncompressing and recompressing the whole text.
      
      It also adds a couple more statistics output, while squelching
      it under -q flag, which the last round forgot to do.
      
        $ time old-git-pack-objects --stdout >/dev/null <RL
        Generating pack...
        Done counting 184141 objects.
        Packing 184141 objects....................
        real    12m8.530s       user    11m1.450s       sys     0m57.920s
        $ time git-pack-objects --stdout >/dev/null <RL
        Generating pack...
        Done counting 184141 objects.
        Packing 184141 objects.....................
        Total 184141, written 184141 (delta 138297), reused 178833 (delta 134081)
        real    0m59.549s       user    0m56.670s       sys     0m2.400s
        $ time git-pack-objects --stdout --no-reuse-delta >/dev/null <RL
        Generating pack...
        Done counting 184141 objects.
        Packing 184141 objects.....................
        Total 184141, written 184141 (delta 134833), reused 47904 (delta 0)
        real    11m13.830s      user    9m45.240s       sys     0m44.330s
      
      There is one remaining issue when --no-reuse-delta option is not
      used.  It can create delta chains that are deeper than specified.
      
          A<--B<--C<--D   E   F   G
      
      Suppose we have a delta chain A to D (A is stored in full either
      in a pack or as a loose object. B is depth1 delta relative to A,
      C is depth2 delta relative to B...) with loose objects E, F, G.
      And we are going to pack all of them.
      
      B, C and D are left as delta against A, B and C respectively.
      So A, E, F, and G are examined for deltification, and let's say
      we decided to keep E expanded, and store the rest as deltas like
      this:
      
          E<--F<--G<--A
      
      Oops.  We ended up making D a bit too deep, didn't we?  B, C and
      D form a chain on top of A!
      
      This is because we did not know what the final depth of A would
      be, when we checked objects and decided to keep the existing
      delta.  Unfortunately, deferring the decision until just before
      the deltification is not an option.  To be able to make B, C,
      and D candidates for deltification with the rest, we need to
      know the type and final unexpanded size of them, but the major
      part of the optimization comes from the fact that we do not read
      the delta data to do so -- getting the final size is quite an
      expensive operation.
      
      To prevent this from happening, we should keep A from being
      deltified.  But how would we tell that, cheaply?
      
      To do this most precisely, after check_object() runs, each
      object that is used as the base object of some existing delta
      needs to be marked with the maximum depth of the objects we
      decided to keep deltified (in this case, D is depth 3 relative
      to A, so if no other delta chain that is longer than 3 based on
      A exists, mark A with 3).  Then when attempting to deltify A, we
      would take that number into account to see if the final delta
      chain that leads to D becomes too deep.
      
      However, this is a bit cumbersome to compute, so we would cheat
      and reduce the maximum depth for A arbitrarily to depth/4 in
      this implementation.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ca5381d4
    • J
      pack-objects: reuse data from existing packs. · a49dd05f
      Junio C Hamano 提交于
      When generating a new pack, notice if we have already needed
      objects in existing packs.  If an object is stored deltified,
      and its base object is also what we are going to pack, then
      reuse the existing deltified representation unconditionally,
      bypassing all the expensive find_deltas() and try_deltas()
      calls.
      
      Also, notice if what we are going to write out exactly match
      what is already in an existing pack (either deltified or just
      compressed).  In such a case, we can just copy it instead of
      going through the usual uncompressing & recompressing cycle.
      
      Without this patch, in linux-2.6 repository with about 1500
      loose objects and a single mega pack:
      
          $ git-rev-list --objects v2.6.16-rc3 >RL
          $ wc -l RL
          184141 RL
          $ time git-pack-objects p <RL
          Generating pack...
          Done counting 184141 objects.
          Packing 184141 objects....................
          a1fc7b3e537fcb9b3c46b7505df859f0a11e79d2
      
          real    12m4.323s
          user    11m2.560s
          sys     0m55.950s
      
      With this patch, the same input:
      
          $ time ../git.junio/git-pack-objects q <RL
          Generating pack...
          Done counting 184141 objects.
          Packing 184141 objects.....................
          a1fc7b3e537fcb9b3c46b7505df859f0a11e79d2
          Total 184141, written 184141, reused 182441
      
          real    1m2.608s
          user    0m55.090s
          sys     0m1.830s
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      a49dd05f
    • A
      Add contrib/gitview from Aneesh. · 8cb711c8
      Aneesh Kumar 提交于
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8cb711c8
    • E
      git-svn: ensure fetch always works chronologically. · defc6492
      Eric Wong 提交于
      We run svn log against a URL without a working copy for the first fetch,
      so we end up a log that's sorted from highest to lowest.  That's bad, we
      always want lowest to highest.  Just default to --revision 0:HEAD now if
      -r isn't specified for the first fetch.
      
      Also sort the revisions after we get them just in case somebody
      accidentally reverses the argument to --revision for whatever reason.
      
      Thanks again to Emmanuel Guerin for helping me find this.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      defc6492
    • E
      git-svn: fix revision order when XML::Simple is not loaded · 1c6bbbf3
      Eric Wong 提交于
      Thanks to Emmanuel Guerin for finding the bug.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1c6bbbf3
  4. 16 2月, 2006 7 次提交
  5. 15 2月, 2006 8 次提交
  6. 14 2月, 2006 8 次提交
  7. 13 2月, 2006 6 次提交