Re: git cherry improvements suggestions
- From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
- Date
- Mar 23, 2011, 19:28 UTC
- Message-ID
- <AANLkTi=7=QDh0Pe9W4bRcGY5Krg7sBqRcZ2C1YonJSRN@mail.gmail.com>
- In-Reply-To
- <4D8A0741.9000506@drmicha.warpmail.net>
On Wed, Mar 23, 2011 at 3:44 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 49 quoted lines
> Piotr Krukowiecki venit, vidit, dixit 23.03.2011 15:43: >> On Wed, Mar 23, 2011 at 2:33 PM, Michael J Gruber >> <git@drmicha.warpmail.net> wrote: >>> Piotr Krukowiecki venit, vidit, dixit 23.03.2011 14:23: >>>> Just some stats: >>>> >>>> git log --cherry-mark --left-right --oneline --date-order branch...trunk >>>> >>>> lists 1004 commits, takes about 20s and memory peaks to about 670MB >>>> twice during the run (I'm on linux with AMD Phenom II X4 945) >>>> >>>> With limit it prints X last commits (the limiting seems to take place after all >>>> work, on the output list only). >>>> >>>> branch..trunk is 551 commits, the other way is 453 commits. >>>> 710 commits are found to be "=", 98 "<", 196 ">". >>>> >>>> Note, I'm not saying it's too slow, or that it's working incorrectly, I'm just >>>> giving real-life stats if anyone was interested. >>>> I suspect such checks won't be done frequently. >>> >>> You don't need to say it's slow - I've said so already :( >>> >>> http://permalink.gmane.org/gmane.comp.version-control.git/169725 >> >> In the link above: >> git cherry A B: 0.4s >> git rev-list --cherry A...B: 1.7s >> >> So rev-list is 4.25x slower. >> >> In my case it's only 1.23x slower: >> >> $ time git rev-list --cherry branch...trunk > /tmp/rev-list >> real 0m18.627s >> user 0m17.710s >> sys 0m0.900s >> >> $ time git cherry branch trunk > /tmp/cherry >> real 0m15.345s >> user 0m14.310s >> sys 0m1.020s >> >> > > How's that with > /dev/null (or with --count for rev-list)? Also, how > many merge bases do you have: > > git merge-base --all branch trunk | wc -l
I expect only one - there should be no merges between those two branches.
I will do measurements tomorrow.
-- Piotr Krukowiecki