From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#24126: vc-hg-state can be extremely slow Date: Tue, 2 Aug 2016 16:32:37 +0300 Message-ID: <932b12d0-6081-99c4-91f7-ed00f42462f2@yandex.ru> References: NNTP-Posting-Host: blaine Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1470145092 31345 195.159.176.226 (2 Aug 2016 13:38:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2016 13:38:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 To: Jonathan Kotta , 24126@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 15:38:07 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bUZtX-0007qH-Jd for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 15:38:07 +0200 Original-Received: from localhost ([::1]:56683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUZtU-0000Bt-5f for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 09:38:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUZoh-0005W7-Jn for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 09:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUZoc-0005rD-OJ for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 09:33:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUZoc-0005r7-Jb for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 09:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUZoc-0001d7-Cg for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 09:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2016 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24126-submit@debbugs.gnu.org id=B24126.14701447686243 (code B ref 24126); Tue, 02 Aug 2016 13:33:02 +0000 Original-Received: (at 24126) by debbugs.gnu.org; 2 Aug 2016 13:32:48 +0000 Original-Received: from localhost ([127.0.0.1]:53447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUZoO-0001cd-1u for submit@debbugs.gnu.org; Tue, 02 Aug 2016 09:32:48 -0400 Original-Received: from mail-lf0-f47.google.com ([209.85.215.47]:35143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUZoL-0001cP-SN for 24126@debbugs.gnu.org; Tue, 02 Aug 2016 09:32:46 -0400 Original-Received: by mail-lf0-f47.google.com with SMTP id f93so138578411lfi.2 for <24126@debbugs.gnu.org>; Tue, 02 Aug 2016 06:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=mZzd5bTNMDvSDrL8PqVWyxFOua1GFbW9y5Y/OPxlA1I=; b=vsjkF4mCgUW/VXIvJxm3y6r4AQgS9sOAzochAIdMc3Rr9w5r9ibB2raTPmH0JaKK05 KxnsGfN1IZ17W0s1pOJPGrHScCK6Xb1muPNTgOUl1so/+xirIIBxQFCEF5d41Bfk0mGA kzUE/RCvq410ewZeX7mIROypEZsL2/iHXJgdV1rtQ3ipFagvKUbh9xFoSyJAb0FkCPJY bnUhMyklFbJvUqlIea00s4sUPZKNheXHgasnGyr9ZdAChBv7WhGIHWouUs6PawRQoUTN mDYg1qMhIu8rgL6gsKBeH1uQmYSBVXNx2dYnLhc6dkAtnUw0o/APmTPMhxP0K5QdbpKI kKAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=mZzd5bTNMDvSDrL8PqVWyxFOua1GFbW9y5Y/OPxlA1I=; b=D2HZKFJQC9MTQ0AE3mvyK596qlib7e4L1U1mXHkY6NpcMiigsloK19yH2s6Edv9dMr OTDFH5kpyHj9Tz56TW2ua094UZODrHWykVTdFwyZ/nBadAZUO/yjyYY1hzPcYKPyBQCU Wi4VDSeGmljyXdO6LrAdx1sFXFqe4HtIDYp1/N6o2/34vF3XCbpQpaeXgUjuZaJPGuLp DrBlc5v+7zIu0sz1WRpg2SlNlHXZkzggB5b/y5yHBSd1u+p0sDxSrnfls7Y4LYENB8YM 6mjkq0CD18ZlFImdg8NQBb71uAE1YumVO7xFBiL7oAaM9gGCTBq6eeofj/h0kLRCOufx GSMA== X-Gm-Message-State: AEkoouuUQ8ra0Fdob3GyKNz6Bz3IocwHbcwxooj1BCaU93oKI8FXqu1oZS8oQfaiQKjj7g== X-Received: by 10.25.38.207 with SMTP id m198mr21271738lfm.201.1470144759614; Tue, 02 Aug 2016 06:32:39 -0700 (PDT) Original-Received: from [192.168.1.190] ([178.252.127.243]) by smtp.googlemail.com with ESMTPSA id k63sm501279lfe.48.2016.08.02.06.32.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2016 06:32:38 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121777 Archived-At: On 08/01/2016 09:40 PM, Jonathan Kotta wrote: > Emacs uses `hg status -A` in vc-hg-state, which in turn is used in many > vc commands (e.g. vc-root-diff). The "-A" option makes mercurial look > at all files under the directory, even the ignored ones. If there are a > lot of ignored files, this will be very slow. Why does it do that? We're passing a specific file name to it. > As an example, I have a repo that's 38MB / 300 files when freshly > checked out, and 34GB / 1.2M files when the build finishes (if you're > curious, it's a yocto project). Without clearing the disk cache, `hg > stat -A > /dev/null` takes 28s; What about 'hg status -A file/name > /dev/null'? > vg-git-state does not have this problem; currently it behaves like `hg > status`, i.e. honoring the ignore rules. There is actually a FIXME > comment regarding this functionality, noting that `git ls-files -i -o > --exclude-standard` is the equivalent to `hg status -A`; this takes over > 400s (I got sick of waiting). The FIXME is outdated, we'll do it by parsing 'git status --porcelain'. Does 'git status --ignored --porcelain -- file/name' take a lot of time for you as well? > I'm guessing VC has some sort of assumption that vc-x-state will return > all files. vc-x-state returns the state of a single file.