From: Junio C Hamano Date: Fri, 24 Jul 2009 23:28:08 GMT Subject: Re: Performance issue of 'git branch' Message-ID: <7vr5w564qf.fsf@alter.siamese.dyndns.org> In-Reply-To: <20090724225917.GA11191@spearce.org> "Shawn O. Pearce" writes: > Theodore Tso wrote: >> On Fri, Jul 24, 2009 at 02:21:20PM -0700, Linus Torvalds wrote: >> > >> > I wonder if there is some way to only load the crazy curl stuff when we >> > actually want open a http: connection. >> >> Well, we could use dlopen(), but I'm not sure that qualifies as a >> _sane_ solution --- especially given that there are approximately 15 >> interfaces used by git, that we'd have to resolve using dlsym(). > > Yea, that's not sane. > > Probably the better approach is to have git fetch and git push be a > different binary from main git, so we only pay the libcurl loading > overheads when we hit transport. Even though that still will hurt people who do not use http, I think it would be a right approach (in the sense that it should not be too painful and with a reasonable gain for local-only operations).