Re: [RFC] Introducing different handling for small/large transactions

2015-01-18 Thread Michael Haggerty
On 01/15/2015 11:36 PM, Stefan Beller wrote: > For everyday use we want git to be fast. Creating one commit should not > touch the packed refs file. If we do other stuff involving more than > one ref, we may accept touching the packed refs file and have a process > which takes slightly longer but c

Re: [RFC] Introducing different handling for small/large transactions

2015-01-16 Thread Stefan Beller
On Thu, Jan 15, 2015 at 3:53 PM, Jeff King wrote: > On Thu, Jan 15, 2015 at 03:24:15PM -0800, Stefan Beller wrote: > >> I see the performance problem as well as the contention problem >> you're pointing out. Dealing with loose refs however creates other >> problems such as directory/file conflicts

Re: [RFC] Introducing different handling for small/large transactions

2015-01-16 Thread Stefan Beller
On Thu, Jan 15, 2015 at 3:34 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> In ref_transaction_commit >> * commit the .lock file to its destination >> * in case this is a deletion: >> * remove the loose ref >> * and repack the packed refs file if ne

Re: [RFC] Introducing different handling for small/large transactions

2015-01-15 Thread Jeff King
On Thu, Jan 15, 2015 at 03:24:15PM -0800, Stefan Beller wrote: > I see the performance problem as well as the contention problem > you're pointing out. Dealing with loose refs however creates other > problems such as directory/file conflicts on renaming. I am trying to > think of a way which moves

Re: [RFC] Introducing different handling for small/large transactions

2015-01-15 Thread Junio C Hamano
Stefan Beller writes: > In ref_transaction_commit > * commit the .lock file to its destination > * in case this is a deletion: > * remove the loose ref > * and repack the packed refs file if necessary Don't you need to repack and then remove the loose one,

Re: [RFC] Introducing different handling for small/large transactions

2015-01-15 Thread Stefan Beller
On Thu, Jan 15, 2015 at 2:46 PM, Jeff King wrote: > On Thu, Jan 15, 2015 at 02:36:11PM -0800, Stefan Beller wrote: > >> So for here is my proposal for small transactions: >> (just one ref [and/or reflog] touched): > > The implication being that a "large" transaction is any with more than > one upd

Re: [RFC] Introducing different handling for small/large transactions

2015-01-15 Thread Jeff King
On Thu, Jan 15, 2015 at 02:36:11PM -0800, Stefan Beller wrote: > So for here is my proposal for small transactions: > (just one ref [and/or reflog] touched): The implication being that a "large" transaction is any with more than one update. I think performance may suffer if you do not also take

[RFC] Introducing different handling for small/large transactions

2015-01-15 Thread Stefan Beller
For everyday use we want git to be fast. Creating one commit should not touch the packed refs file. If we do other stuff involving more than one ref, we may accept touching the packed refs file and have a process which takes slightly longer but can handle more complex requests correctly, such as re