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

Re: q: faster way to integrate/merge lots of topic branches?

From
IMIngo Molnar <mingo@elte.hu>
Date
Jul 23, 2008, 15:06 UTC
Message-ID
<20080723150621.GA8499@elte.hu>
In-Reply-To
<20080723145622.GA23440@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
Show 13 quoted lines
> > Shouldn't this be:
> > 
> > [ -f "$CACHE" -a "$CACHE" -nt .git/refs/heads/$BRANCH ] && {
> > 
> > ?
> 
> yeah, i just figured it out too ... the hard way :)
> 
> Updated script below. This works fine across resets in the master 
> branch.
> 
> While it's fast in the empty-merge case, it's not as fast as i'd like 
> it to be in the almost-empty-merge case.
When i update a topic branch, i first get a relatively fast run:
  earth4:~/tip> time todo-merge-all
  merging all branches ...
  Auto-merged arch/x86/kernel/genx2apic_uv_x.c
  Merge made by recursive.
   arch/x86/kernel/genx2apic_uv_x.c |    1 -
   1 files changed, 0 insertions(+), 1 deletions(-)
  ... merge done.
  real    0m6.625s
  user    0m3.740s
  sys     0m2.563s
Then on the next run it's slower:
  earth4:~/tip> time todo-merge-all
  merging all branches ...
  ... merge done.
  real    0m30.823s
  user    0m23.403s
  sys     0m7.545s

that's unfortunate. The freshly updated topic branch was at the end of the run, now all other topic branches will have to run slow at least once until they become cached again.

Perhaps the cache should update all other current topics to the new sha1, to establish the fact that they were not merged this time. (and that they are still not to be merged)

(It's still much faster than completely uncached though, because of the overlap in sha1's.)

Third (empty) run is fast again, because it's fully cached:
  earth4:~/tip> time todo-merge-all
  merging all branches ...
  ... merge done.
  real    0m3.036s
  user    0m1.360s
  sys     0m1.782s

But it would be nice if the cache worked more intelligently in the one-topic-updated-only case as well.

	Ingo
Previous: Ingo MolnarNext: Andreas Ericsson
Message 6 of 32 in “q: faster way to integrate/merge lots of topic branches?”
  1. Ingo MolnarJul 23, 2008
  2. Ingo MolnarJul 23, 2008
  3. Ingo MolnarJul 23, 2008
  4. Jay SoffianJul 23, 2008
  5. Ingo MolnarJul 23, 2008
  6. Ingo MolnarJul 23, 2008
  7. Andreas EricssonJul 23, 2008
  8. Ingo MolnarJul 23, 2008
  9. Miklos VajnaJul 23, 2008
  10. Sergey VlasovJul 23, 2008
  11. Ingo MolnarJul 23, 2008
  12. Ingo MolnarJul 23, 2008
  13. SZEDER GáborJul 23, 2008
  14. Ingo MolnarJul 23, 2008
  15. Junio C HamanoJul 23, 2008
  16. 1/2 builtin-branch.c: remove unused code in append_ref() callback functionJunio C Hamano, Jul 23, 2008
  17. builtin-branch.c: optimize --merged and --no-mergedJunio C Hamano, Jul 23, 2008
  18. Lars HjemliJul 24, 2008
  19. Nanako ShiraishiJul 24, 2008
  20. Lars HjemliJul 24, 2008
  21. Ingo MolnarJul 24, 2008
  22. Linus TorvaldsJul 23, 2008
  23. Linus TorvaldsJul 23, 2008
  24. Junio C HamanoJul 23, 2008
  25. Ingo MolnarJul 24, 2008
  26. Junio C HamanoJul 25, 2008
  27. Björn SteinbrinkJul 23, 2008
  28. Santi BéjarJul 23, 2008
  29. Linus TorvaldsJul 23, 2008
  30. Pierre HabouzitJul 23, 2008
  31. Pierre HabouzitJul 23, 2008
  32. Pierre HabouzitJul 23, 2008

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.