From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wei Liu Newsgroups: gmane.emacs.help Subject: vc-git slows Emacs down quite a bit, trying to find a way to remove hooks Date: Mon, 26 Mar 2012 20:11:54 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1332789903 5248 80.91.229.3 (26 Mar 2012 19:25:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2012 19:25:03 +0000 (UTC) Cc: liuw@liuw.name To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 26 21:25:02 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SCFXJ-0007y9-Q4 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Mar 2012 21:25:01 +0200 Original-Received: from localhost ([::1]:34387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCFXI-0000xS-RD for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Mar 2012 15:25:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCFLG-0005KT-OP for help-gnu-emacs@gnu.org; Mon, 26 Mar 2012 15:12:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCFLB-0003Lj-Ha for help-gnu-emacs@gnu.org; Mon, 26 Mar 2012 15:12:34 -0400 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:38114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCFLB-0003Kk-DS for help-gnu-emacs@gnu.org; Mon, 26 Mar 2012 15:12:29 -0400 Original-Received: by ggeq1 with SMTP id q1so4864154gge.0 for ; Mon, 26 Mar 2012 12:12:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type :x-gm-message-state; bh=VGD0oJb5rlSj4u0nRGudYyQ4de+iH3ZDTHbWuhsAkTM=; b=EO34Irim343NkPib2pKXQYx6FPB1Xoo61gvW1TN9YHgpJ6I8+pHPdcXlXz7423wHhb KMwPomGhqx9jUZsqfMz+YivjY4Iwj96te3VJJb4pSp2dxnTxzELiRivu8l9NWxRFFUqv BJsqly4W1Hi/yUMVZ/pIeT3ElWAtjJYl/qrAvjjzeu8EDF9rawkn9DvrcnaEZmnuBnkK KhvZUqGBmZ2TCD7rnEZNdY1W+QmR8jtPCcMAsMDempuKBExLKTWaNJoRKzEL1q51x+lv LX41p6y5eDK+bTypgfmiS5RxoCUSQlRXW0WeEf5rlx1s/TyNTMGDChfNge5bV8XJ/5fo XJnQ== Original-Received: by 10.68.74.97 with SMTP id s1mr55574763pbv.46.1332789145321; Mon, 26 Mar 2012 12:12:25 -0700 (PDT) Original-Received: by 10.142.255.17 with HTTP; Mon, 26 Mar 2012 12:11:54 -0700 (PDT) X-Gm-Message-State: ALoCoQnfiLaGWgY3z1zlciq8jd95tYR3nM4CaOwFubuUXxhCikDkCmRgkpZa+F2qNuvVHq0deZzm X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.169 X-Mailman-Approved-At: Mon, 26 Mar 2012 15:24:56 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84103 Archived-At: Hi all I find that vc-git takes quite a lot of time to load, both in Emacs 23 and Emacs snapshot. On my dev machine it takes up to 21 seconds. :-( I don't want to disable vc-mode entirely, I just want to make sure that vc-git doesn' t get loaded when I don't need it. There was a topic [0] on this issue on stackoverflow. I took the advice to remove vc-find-file-hook from fine-file-hook list, thus speeding up Emacs a lot. But when I save file, vc-git gets loaded once again, which consumes 21 seconds. So my questions are a) how to disable this save file hook (I grepped in vc-*.el, didn't find save-*-hook), b) are there any other hooks I need to take care of? Extra questions (to developers and/or Emacs gurus): Why is vc-git so slow (see [0] for profiling details)? Is there a genuine way to fix this? My setup: Intel Q9450, 4GB Ram, 500GB 7200rpm disk. Was playing with Linux kernel git repository, which was stored in local disk. Thanks Wei. [0] http://stackoverflow.com/questions/6724471/git-slows-down-emacs-to-death-how-to-fix-this