Re: [StGIT PATCH] Don't use patches/<branch>/current

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/05/07, Karl Hasselström <kha@xxxxxxxxxxx> wrote:
I set up a kernel repository with 100 applied and 100 unapplied
patches:
[...]
Then repeatedly:

  $ time stg series >/dev/null

I ran 'git repack -a -d' and 'git prune'. There are no other objects
apart from the generated pack:

$ du -sh .git
211M    .git

And then repeatedly 'time stg series > /dev/null':

real    0m1.638s
user    0m1.422s
sys     0m0.088s

real    0m2.542s
user    0m1.436s
sys     0m0.078s

real    0m2.916s
user    0m1.424s
sys     0m0.083s

real    0m2.940s
user    0m1.425s
sys     0m0.081s

real    0m1.614s
user    0m1.421s
sys     0m0.081s

real    0m1.587s
user    0m1.423s
sys     0m0.081s

real    0m2.653s
user    0m1.427s
sys     0m0.075s

But my kernel repository is _much_ smaller than yours:

  $ du -sh .git
  183M    .git

Do you perchance have a bunch of loose objects in there?

It got smaller after repacking but it is still bigger than yours.
Maybe the reason is that I have 14 branches with various patches, some
of them just for historical reasons but going back to 2.6.12. There
are also several commits generated for the patch logs.

The CPU is a P4 at 2.5GHz and the 'stg series' operation seems to be
CPU bound rather than IO. I'm also using Python 2.3 on this PC and for
this reason I changed 2 generator constructs (x for x in ...) with
list comprehension (see the attached patch).

--
Catalin
commit f7cc1f7fa6b2ee4f42e812970760ba5db5d2cafc
Author: Catalin Marinas <catalin.marinas@xxxxxxxxx>
Date:   Wed May 16 13:08:45 2007 +0100

    refresh	b5003aa7bb5ec384e1dbe2887c07885a791384c2

diff --git a/stgit/stack.py b/stgit/stack.py
index 13eb692..0ef26b8 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -349,8 +349,8 @@ def unapplied_patches(ref2hash):
     unapplied = Set()
     for line in git._output_lines(
         'git-rev-list --stdin',
-        ('%s%s\n' % (['', '^'][ref == None], sha1)
-         for ref, sha1 in ref2hash.iteritems())):
+        ['%s%s\n' % (['', '^'][ref == None], sha1)
+         for ref, sha1 in ref2hash.iteritems()]):
         for ref in hash2refs.get(line.strip(), []):
             unapplied.add(ref)
     return unapplied
@@ -364,7 +364,7 @@ def sort_applied_patches(ref2hash):
         if r != None:
             hash2refs.setdefault(h, Set()).add(r)
 
-    missing = Set(ref for ref in ref2hash.iterkeys() if ref != None)
+    missing = Set([ref for ref in ref2hash.iterkeys() if ref != None])
     if not missing:
         return []
     applied = []

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux