From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: vc-dir operation is very slow on large git repositories in Emacs 26.1 Date: Thu, 21 Jun 2018 17:32:00 +0300 Message-ID: <83zhzoqkgv.fsf@gnu.org> References: <83k1qtsbgi.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529591403 26393 195.159.176.226 (21 Jun 2018 14:30:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 14:30:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alex Harsanyi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 16:29:59 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW0b1-0006lL-7H for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 16:29:59 +0200 Original-Received: from localhost ([::1]:55814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0d8-00064m-Fl for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 10:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0cy-00063s-8q for emacs-devel@gnu.org; Thu, 21 Jun 2018 10:32:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW0cv-000131-3R for emacs-devel@gnu.org; Thu, 21 Jun 2018 10:32:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0cv-00012u-09; Thu, 21 Jun 2018 10:31:57 -0400 Original-Received: from [176.228.60.248] (port=1443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fW0cr-0005S1-Et; Thu, 21 Jun 2018 10:31:56 -0400 In-reply-to: (message from Alex Harsanyi on Thu, 21 Jun 2018 06:33:57 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226568 Archived-At: > From: Alex Harsanyi > Date: Thu, 21 Jun 2018 06:33:57 +0800 > Cc: emacs-devel@gnu.org > > >> The operation that takes a long time is the ls-files > >> operation, "git --no-pager ls-files -z -c -s --", but running > >> that command in a terminal completes in less than a second. > > > > So you are saying that in Emacs 25.2 this slow Git command was not > > invoked in your scenario? > > I do not say that. Emacs 25.2 completes too fast to be able to > figure what is going on. I suspect 25.2 uses the same git > command though, as the command itself completes quickly. Can you step with Edebug through the vc-git.el function where this command is invoked, and see if it gets invoked in Emacs 25? > I suspect this might be a problem with my environment, but I do > not know what. It also happens on two machines: my work one and > my home one. I would appreciate any hints on how to diagnose > this. One possibility is to run "M-x profile-start" before invoking vc-dir, then run "M-x profile-report" after it finishes, and look at the profile. If vc-dir takes 2 minutes, the profiler should be able to collect enough evidence to point at the guilty parties. For best results, load vc-git.el manually, so that Emacs runs the interpreted Lisp code, not byte-compiled code. > Both versions were downloaded as compiled binaries from the > gnu.org website and not modified in any way -- this happens when > I start Emacs with "-Q -no-site-file". Are they both 64-bit builds (or both 32-bit)?