From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Slow start-up on Git trees Date: Wed, 19 Aug 2009 13:56:00 -0700 (PDT) Message-ID: <200908192056.n7JKu0Bv001763@godzilla.ics.uci.edu> References: <20090819132341.3f2dddc5@gentoo.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250715498 28436 80.91.229.12 (19 Aug 2009 20:58:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Aug 2009 20:58:18 +0000 (UTC) Cc: emacs@gentoo.org, Joakim.Tjernlund@transmode.se, emacs-devel@gnu.org To: Christian Faulhammer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 19 22:58:10 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MdsER-0002Wc-Oc for ged-emacs-devel@m.gmane.org; Wed, 19 Aug 2009 22:58:08 +0200 Original-Received: from localhost ([127.0.0.1]:55530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdsER-0001ai-AW for ged-emacs-devel@m.gmane.org; Wed, 19 Aug 2009 16:58:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdsEL-0001aJ-Ou for emacs-devel@gnu.org; Wed, 19 Aug 2009 16:58:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdsEH-0001a6-Bi for emacs-devel@gnu.org; Wed, 19 Aug 2009 16:58:01 -0400 Original-Received: from [199.232.76.173] (port=44806 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdsEH-0001a3-56 for emacs-devel@gnu.org; Wed, 19 Aug 2009 16:57:57 -0400 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:62298) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MdsEG-0006dh-Hw for emacs-devel@gnu.org; Wed, 19 Aug 2009 16:57:56 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7JKu0qB020644; Wed, 19 Aug 2009 13:56:00 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7JKu0Bv001763; Wed, 19 Aug 2009 13:56:00 -0700 (PDT) In-Reply-To: <20090819132341.3f2dddc5@gentoo.org> (Christian Faulhammer's message of "Wed, 19 Aug 2009 13:23:41 +0200") Original-Lines: 20 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7JKu0qB020644 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114414 Archived-At: Christian Faulhammer writes: > Hi, > > Joakim Tjernlund reported in > http://bugs.gentoo.org/show_bug.cgi?id=281009 that Emacs started in a > Git tree is really slow. This does not happen with other SCM systems > and we were able to reproduce the problem and narrowing it down > to /usr/bin/git diff-index -z HEAD -- Makefile, called in > vc-git-state. Any possibilities to improve performance here? There are at lease two ways: - talk the git people to improve the performance of "git diff-index", - implement a vc-git-state-heuristic (see other vc-*-state-heuristic functions) that parses .git/index and uses that return the state of the file, thus avoiding the "git diff-index" call. Is worth it? I'd say probably not, the delay only happens the first time of accessing a file in the git tree.