{"thread":{"id":"12216","subject":"git svn forking an awful lot of \"git config\"s","startedAt":"2008-02-20T15:27:01Z","lastAt":"2008-02-21T00:18:42Z","messageCount":5,"participants":["Johannes Schindelin","Eric Wong","Jakub Narebski","Nagy Balázs"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69376","messageId":"alpine.LSU.1.00.0802201520580.17164@racer.site","threadId":"12216","inReplyTo":null,"subject":"git svn forking an awful lot of \"git config\"s","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-20T15:27:01Z","receivedAt":"2008-02-20T15:27:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nwe are approaching our first release of msysGit's installer with git-svn.  \nHowever, I am experiencing a very bad performance, and an error:\n\n$ git svn fetch\ntrace: exec: 'git-svn' 'fetch'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.fetchall'\ntrace: built-in: git 'config' '--get' 'svn.username'\ntrace: built-in: git 'config' '--get' 'svn.repackflags'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.quiet'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache'\ntrace: built-in: git 'config' '--get' 'svn.revision'\ntrace: built-in: git 'config' '--int' '--get' 'svn.repack'\ntrace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout'\ntrace: built-in: git 'config' '--get' 'svn.configdir'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.followparent'\ntrace: built-in: git 'config' '--get' 'svn.authorsfile'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor'\ntrace: built-in: git 'rev-parse' '--symbolic' '--all'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.branches-maxRev'\ntrace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.tags-maxRev'\ntrace: built-in: git 'config' '--get' 'svn-remote.svn.url'\ntrace: built-in: git 'config' '--get' 'svn-remote.svn.uuid'\ntrace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '8'\ncould not lock config file\nconfig svn-remote.svn.branches-maxRev 8: command returned error: 255\n\nI suspect that the locking problem is due to some strange anti-virus \ninteraction, because issuing the same command on the command line \nsucceeds.\n\nHowever, did you notice the many calls to \"git config\"?  Especially the \nthree ones which list all values anyway?\n\nI am not really sure if that is the single reason of the slowness -- \nremember, Windows is mightily spawn()-challenged -- but it sure would help \nto have git-svn read the config once at the beginning, probably with \"-z\", \ntoo, and then just read from the cached values, no?\n\nCiao,\nDscho\n\nP.S.: how far is the svn:external->submodule stuff?\n"},{"id":"69415","messageId":"20080220223953.GA32663@hand.yhbt.net","threadId":"12216","inReplyTo":"alpine.LSU.1.00.0802201520580.17164@racer.site","subject":"Re: git svn forking an awful lot of \"git config\"s","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-02-20T22:39:53Z","receivedAt":"2008-02-20T22:39:53Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n> \n> we are approaching our first release of msysGit's installer with git-svn.  \n> However, I am experiencing a very bad performance, and an error:\n> \n> $ git svn fetch\n> trace: exec: 'git-svn' 'fetch'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.fetchall'\n> trace: built-in: git 'config' '--get' 'svn.username'\n> trace: built-in: git 'config' '--get' 'svn.repackflags'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.quiet'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache'\n> trace: built-in: git 'config' '--get' 'svn.revision'\n> trace: built-in: git 'config' '--int' '--get' 'svn.repack'\n> trace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout'\n> trace: built-in: git 'config' '--get' 'svn.configdir'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.followparent'\n> trace: built-in: git 'config' '--get' 'svn.authorsfile'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps'\n> trace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor'\n> trace: built-in: git 'rev-parse' '--symbolic' '--all'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.branches-maxRev'\n> trace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.tags-maxRev'\n> trace: built-in: git 'config' '--get' 'svn-remote.svn.url'\n> trace: built-in: git 'config' '--get' 'svn-remote.svn.uuid'\n> trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '8'\n> could not lock config file\n> config svn-remote.svn.branches-maxRev 8: command returned error: 255\n> \n> I suspect that the locking problem is due to some strange anti-virus \n> interaction, because issuing the same command on the command line \n> succeeds.\n\nI believe somebody on the list also had the same problem with file\nlocking in Windows.  Unfortunately, I have little idea as to what could\nbe wrong.  Could Windows not be releasing file locks properly?\n\nIt could be worth it to write a standalone Perl script that replicates\nthe git-config calls without the rest of git-svn getting in the way...\n\n> However, did you notice the many calls to \"git config\"?  Especially the \n> three ones which list all values anyway?\n> \n> I am not really sure if that is the single reason of the slowness -- \n> remember, Windows is mightily spawn()-challenged -- but it sure would help \n> to have git-svn read the config once at the beginning, probably with \"-z\", \n> too, and then just read from the cached values, no?\n\nMany months ago, I thought about implementing a transparent caching layer\nin Git.pm to work with git configs.  Of course, that requires\ncooperation from all readers/writers within the process...  Done\ncorrectly, it would help more than just git-svn. too.\n\nI think I had this idea around the time we made git-config output Perl\nhashes and arrays.\n\n> Ciao,\n> Dscho\n> \n> P.S.: how far is the svn:external->submodule stuff?\n\nYikes.  I've let other work pile up on my ever-growing todo-list :/\nI'll see if I can dig it out and wrap it up this weekend or next...\n\n-- \nEric Wong\n"},{"id":"69425","messageId":"m3ejb7tdbo.fsf@localhost.localdomain","threadId":"12216","inReplyTo":"20080220223953.GA32663@hand.yhbt.net","subject":"Re: git svn forking an awful lot of \"git config\"s","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-20T23:31:28Z","receivedAt":"2008-02-20T23:31:28Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Many months ago, I thought about implementing a transparent caching layer\n> in Git.pm to work with git configs.  Of course, that requires\n> cooperation from all readers/writers within the process...  Done\n> correctly, it would help more than just git-svn. too.\n\nTake a look how gitweb uses \"git config -z -l\" to read all config\nin one go, and save it to hash for later use, lazily.\n \n> I think I had this idea around the time we made git-config output Perl\n> hashes and arrays.\n\nThis is an alternate solution, better for simple scripts and one-off\nscripts (you don't need to write \"git config -z -l\" parser), but\nI think that additional eval might be not good for performance.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"69430","messageId":"47BCBE70.8020706@iksz.hu","threadId":"12216","inReplyTo":"m3ejb7tdbo.fsf@localhost.localdomain","subject":"Re: git svn forking an awful lot of \"git config\"s","fromName":"Nagy Balázs","fromEmail":"js@iksz.hu","sentAt":"2008-02-20T23:57:36Z","receivedAt":"2008-02-20T23:57:36Z","isPatch":false,"sender":{"key":"js@iksz.hu","avatar":"https://gravatar.com/avatar/8e618db1f4a022c12a6f0cd5a9632663f61afd781108fdf32f2433589b1901b8?d=mp&s=160"},"body":"Jakub Narebski wrote:\n> Take a look how gitweb uses \"git config -z -l\" to read all config\n> in one go, and save it to hash for later use, lazily.\n...\n> This is an alternate solution, better for simple scripts and one-off\n> scripts (you don't need to write \"git config -z -l\" parser), but\n> I think that additional eval might be not good for performance.\n>   \n\n\nMaybe I'll finish my git-depot proof of concept script someday.  Here's \nthe configuration reader method I use (please note git-depot doesn't use \nrepositories -- yet):\n\nsub readConfig\n{\n\tmy $self = shift;\n\tmy ($cfg, @cfg, $cat, $key, $val);\n\n\t$cfg = Git::command(qw/config -z -l/);\n\t@cfg = split(/\\000/m, $cfg);\n\t%{$self->{cfg}} = ();\n\tforeach (@cfg) {\n\t\tif (($cat, $key, $val) = (/\\A(\\S+)\\.(\\S+)[\\n\\r]+^(.+)\\Z/ms)) {\n\t\t\tnext unless $cat eq 'depot';\n\t\t\t$self->{cfg}->{$key} = $val;\n\t\t}\n\t}\n\treturn 1;\n}\n\nWorks like a charm.\n-- \n-jul-\n"},{"id":"69436","messageId":"alpine.LSU.1.00.0802210006590.17164@racer.site","threadId":"12216","inReplyTo":"20080220223953.GA32663@hand.yhbt.net","subject":"Re: git svn forking an awful lot of \"git config\"s","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-21T00:18:42Z","receivedAt":"2008-02-21T00:18:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Him\n\nOn Wed, 20 Feb 2008, Eric Wong wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> > we are approaching our first release of msysGit's installer with \n> > git-svn.  However, I am experiencing a very bad performance, and an \n> > error:\n> > \n> > $ git svn fetch\n> > trace: exec: 'git-svn' 'fetch'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.fetchall'\n> > trace: built-in: git 'config' '--get' 'svn.username'\n> > trace: built-in: git 'config' '--get' 'svn.repackflags'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.quiet'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache'\n> > trace: built-in: git 'config' '--get' 'svn.revision'\n> > trace: built-in: git 'config' '--int' '--get' 'svn.repack'\n> > trace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout'\n> > trace: built-in: git 'config' '--get' 'svn.configdir'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.followparent'\n> > trace: built-in: git 'config' '--get' 'svn.authorsfile'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps'\n> > trace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor'\n> > trace: built-in: git 'rev-parse' '--symbolic' '--all'\n> > trace: built-in: git 'config' '-l'\n> > trace: built-in: git 'config' '-l'\n> > trace: built-in: git 'config' '-l'\n> > trace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.branches-maxRev'\n> > trace: built-in: git 'config' '--int' '--get' 'svn-remote.svn.tags-maxRev'\n> > trace: built-in: git 'config' '--get' 'svn-remote.svn.url'\n> > trace: built-in: git 'config' '--get' 'svn-remote.svn.uuid'\n> > trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '8'\n> > could not lock config file\n> > config svn-remote.svn.branches-maxRev 8: command returned error: 255\n> > \n> > I suspect that the locking problem is due to some strange anti-virus \n> > interaction, because issuing the same command on the command line \n> > succeeds.\n> \n> I believe somebody on the list also had the same problem with file \n> locking in Windows.  Unfortunately, I have little idea as to what could \n> be wrong.  Could Windows not be releasing file locks properly?\n\nI am not half as concerned with locks on Windows (since they occur \nregularly, thanks to _two_ Antiviruses, go figure), as with unnecessary \nconfig file reading.\n\n> > However, did you notice the many calls to \"git config\"?  Especially \n> > the three ones which list all values anyway?\n> > \n> > I am not really sure if that is the single reason of the slowness -- \n> > remember, Windows is mightily spawn()-challenged -- but it sure would \n> > help to have git-svn read the config once at the beginning, probably \n> > with \"-z\", too, and then just read from the cached values, no?\n> \n> Many months ago, I thought about implementing a transparent caching \n> layer in Git.pm to work with git configs.  Of course, that requires \n> cooperation from all readers/writers within the process...  Done \n> correctly, it would help more than just git-svn. too.\n\nYes, but I am really scared there.  Last time, Pasky tried to put a _lot_ \ninto Git.pm, and it did not work here.  As a consequence, I put aside a \n_lot_ of my time to turn the most important (to me!) perl scripts into \nbuiltins.\n\n> I think I had this idea around the time we made git-config output Perl \n> hashes and arrays.\n\nYou mean -z?\n\n> > P.S.: how far is the svn:external->submodule stuff?\n> \n> Yikes.  I've let other work pile up on my ever-growing todo-list :/ I'll \n> see if I can dig it out and wrap it up this weekend or next...\n\nActually, I can understand what you're talking about.  But just let me \ntell this: I (amongst others) are _excited_ to wait until you have that \nparticular feature working...\n\nCiao,\nDscho\n"}]}