From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Bennee Newsgroups: gmane.emacs.help Subject: Re: Tracking down why emacsclient -c is so slow Date: Sat, 22 Aug 2009 09:10:33 +0100 Message-ID: References: <399CF4B9-9CAD-4E68-BB8F-09EF6A787E43@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250928668 32287 80.91.229.12 (22 Aug 2009 08:11:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2009 08:11:08 +0000 (UTC) Cc: help-gnu-emacs mailing list To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 10:11:01 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Melgj-0007cC-8t for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 10:11:01 +0200 Original-Received: from localhost ([127.0.0.1]:44902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Melgi-0005qg-D4 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 04:11:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MelgO-0005qb-Q1 for help-gnu-emacs@gnu.org; Sat, 22 Aug 2009 04:10:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MelgK-0005qP-8z for help-gnu-emacs@gnu.org; Sat, 22 Aug 2009 04:10:40 -0400 Original-Received: from [199.232.76.173] (port=51410 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MelgK-0005qM-6r for help-gnu-emacs@gnu.org; Sat, 22 Aug 2009 04:10:36 -0400 Original-Received: from mail-ew0-f211.google.com ([209.85.219.211]:54227) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MelgJ-0005JM-CB for help-gnu-emacs@gnu.org; Sat, 22 Aug 2009 04:10:35 -0400 Original-Received: by ewy7 with SMTP id 7so1206018ewy.31 for ; Sat, 22 Aug 2009 01:10:34 -0700 (PDT) Original-Received: by 10.216.10.149 with SMTP id 21mr442666wev.56.1250928633672; Sat, 22 Aug 2009 01:10:33 -0700 (PDT) In-Reply-To: <399CF4B9-9CAD-4E68-BB8F-09EF6A787E43@Web.DE> X-Google-Sender-Auth: 3762e7938cd97f22 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67393 Archived-At: 2009/8/21 Peter Dyballa : > > Am 21.08.2009 um 20:25 schrieb Alex Bennee: > >> Are there any other hooks run between after-make-frame-functions and >> server-visit-hook I can hook to to see why it takes so long? > > > Yes, they're called PCI, PCI-Express, AGP, and much more. Stick another and > faster graphics card in such a slot and you'll less consumed to create a new > frame. > The current delays I'm seeing are a little excessive, especially considering that the rest of the OS doesn't seem to have too much problem displaying compiz and full-rate HD video. The results of the profile look like: Function Name Call Count Elapsed Time Average Time =============================== ========== ============ ============ make-frame 2 17.385781 8.6928905 frame-set-background-mode 14 0.0370519999 0.0026465714 frame-parameters 54 0.0008449999 1.564...e-05 frame-parameter 494 0.0007000000 1.417...e-06 framep 956 0.0004720000 4.937...e-07 frame-list 429 0.0003700000 8.624...e-07 frame-or-buffer-changed-p 39 0.0001459999 3.743...e-06 framep-on-display 202 0.0001409999 6.980...e-07 frame-selected-window 46 5.799...e-05 1.260...e-06 frame-live-p 58 4.599...e-05 7.931...e-07 frame-visible-p 53 2.800...e-05 5.283...e-07 frame-char-width 13 1.200...e-05 9.230...e-07 frame-char-height 14 1.199...e-05 8.571...e-07 I thought I'd throw oprofile at the task but as far as it's concerned emacs spends most of it's time in mark-object and Fbyte_code and isn't actually a significant proportion of the CPU time. Something else seems to be going on. -- Alex, homepage: http://www.bennee.com/~alex/ http://www.half-llama.co.uk