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 can

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 gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: In ref_transaction_commit * commit the .lock file to its destination * in case this is a deletion: * remove the loose ref * and repack

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 p...@peff.net 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

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

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 Stefan Beller
On Thu, Jan 15, 2015 at 2:46 PM, Jeff King p...@peff.net 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

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

2015-01-15 Thread Junio C Hamano
Stefan Beller sbel...@google.com 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

[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