git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
May 17, 2007, 12:43 UTC
Message-ID
<b0943d9e0705170543g4d8c7542p6b44a4e6fa54676a@mail.gmail.com>
In-Reply-To
<20070516204029.GB17805@diana.vm.bytemark.co.uk>
On 16/05/07, Karl Hasselström <kha@treskal.com> 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

Show 6 quoted lines
> 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@gmail.com>
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 = []
Previous: Karl HasselströmNext: Karl Hasselström
Message 12 of 36 in “Don't use patches/<branch>/current”
  1. Don't use patches/<branch>/currentKarl Hasselström, May 6, 2007
  2. Catalin MarinasMay 15, 2007
  3. Peter OberndorferMay 15, 2007
  4. Catalin MarinasMay 15, 2007
  5. Karl HasselströmMay 15, 2007
  6. Remove obsolete files when deleting a branchKarl Hasselström, May 15, 2007
  7. Catalin MarinasMay 15, 2007
  8. Karl HasselströmMay 16, 2007
  9. Catalin MarinasMay 16, 2007
  10. Karl HasselströmMay 16, 2007
  11. Karl HasselströmMay 16, 2007
  12. Catalin MarinasMay 17, 2007
  13. Karl HasselströmMay 17, 2007
  14. Catalin MarinasMay 17, 2007
  15. Karl HasselströmMay 18, 2007
  16. 0/6 New and improved DAG appliedness seriesKarl Hasselström, Jun 10, 2007
  17. 1/6 Verify patch status during the testKarl Hasselström, Jun 10, 2007
  18. 2/6 Make use of the get_patch() utility functionKarl Hasselström, Jun 10, 2007
  19. 3/6 Compute patch appliedness from commit DAGKarl Hasselström, Jun 10, 2007
  20. 4/6 Test the new DAG appliedness machineryKarl Hasselström, Jun 10, 2007
  21. 5/6 Fix bash completion after the DAG appliedness patchKarl Hasselström, Jun 10, 2007
  22. 6/6 Speed up the appliedness testKarl Hasselström, Jun 10, 2007
  23. Yann DirsonJun 30, 2007
  24. Karl HasselströmJul 1, 2007
  25. Yann DirsonMay 15, 2007
  26. Catalin MarinasMay 15, 2007
  27. Yann DirsonMay 15, 2007
  28. Karl HasselströmMay 16, 2007
  29. 0/5 Metadata format versioningKarl Hasselström, May 19, 2007
  30. 1/5 Fix config caching so that get, set, get worksKarl Hasselström, May 19, 2007
  31. 2/5 Have only a single command in each test_expect_failureKarl Hasselström, May 19, 2007
  32. 3/5 Upgrade old StGIT branches to new-format metadataKarl Hasselström, May 19, 2007
  33. 4/5 Test the format version upgrade codeKarl Hasselström, May 19, 2007
  34. 5/5 Add --binary flag to commands that generate diffsKarl Hasselström, May 19, 2007
  35. Catalin MarinasMay 22, 2007
  36. Karl HasselströmMay 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.