From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dov Grobgeld Newsgroups: gmane.emacs.bugs Subject: bug#10580: 24.0.92; gdb initialization takes more than one minute at 100% CPU Date: Thu, 10 May 2012 22:07:38 +0300 Message-ID: References: <87havtvpeb.fsf@gnu.org> <874nrsem67.fsf@gnu.org> <874nrswme9.fsf@gnu.org> <87zk9kv75l.fsf@gnu.org> <87mx5j6pqs.fsf@gnu.org> <877gwm3ajn.fsf@gnu.org> <83txzq1s4y.fsf@gnu.org> <837gwl1ckx.fsf@gnu.org> <87pqacrunj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8fb1fe205d95db04bfb35576 X-Trace: dough.gmane.org 1336676894 30266 80.91.229.3 (10 May 2012 19:08:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 May 2012 19:08:14 +0000 (UTC) Cc: 10580@debbugs.gnu.org, schwab@linux-m68k.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 10 21:08:13 2012 Return-path: Envelope-to: geb-bug-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 1SSYih-00030A-N8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 May 2012 21:08:11 +0200 Original-Received: from localhost ([::1]:36234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSYig-0007RS-Vd for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 May 2012 15:08:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSYiZ-0007RD-UE for bug-gnu-emacs@gnu.org; Thu, 10 May 2012 15:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSYiY-0001mA-3G for bug-gnu-emacs@gnu.org; Thu, 10 May 2012 15:08:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSYiX-0001lx-Tt for bug-gnu-emacs@gnu.org; Thu, 10 May 2012 15:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SSYiX-0004p1-MY for bug-gnu-emacs@gnu.org; Thu, 10 May 2012 15:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dov Grobgeld Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 May 2012 19:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10580-submit@debbugs.gnu.org id=B10580.133667687118511 (code B ref 10580); Thu, 10 May 2012 19:08:01 +0000 Original-Received: (at 10580) by debbugs.gnu.org; 10 May 2012 19:07:51 +0000 Original-Received: from localhost ([127.0.0.1]:47117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSYiM-0004oV-Ka for submit@debbugs.gnu.org; Thu, 10 May 2012 15:07:50 -0400 Original-Received: from mail-qc0-f172.google.com ([209.85.216.172]:33195) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSYiK-0004oF-SN for 10580@debbugs.gnu.org; Thu, 10 May 2012 15:07:49 -0400 Original-Received: by qcsq13 with SMTP id q13so1493211qcs.3 for <10580@debbugs.gnu.org>; Thu, 10 May 2012 12:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kxKyibFv5tfnYA6wZeQjC9oaYPkyBqEWia6+XEuCoDA=; b=CaFXiJnrADaR+sbjy8nsV+VbdWaLfIRZYFBk1ApCp4gpwG/ojIDooYjtf3ekjmyFv0 AuQECxK54GA6jYqFFDlbVLn2o93UyxmpmnEN03mboVNif3SGCWzT4o1lTvQhhJG2L3rP Z1Pw2BOWVbT2JoE1Bpb7sgPmyHH8bQMOva0Pa9Aa1/aRWYSnVsqADXpuyws1NrgQJDh9 KNsGdP4pc7H15GmMWTAVOedF7aTwqTxo/R8NCCRcUuO/MYff1cx+8OcrURy3GNDJIRZt EvVVApQRqL7/A+TtvNh5+Y3hPBRQKvZIKzarQ7om4BnKpHuhP8/hKYWIr4VjcwdYd8QT ohUQ== Original-Received: by 10.60.1.67 with SMTP id 3mr7630727oek.15.1336676859090; Thu, 10 May 2012 12:07:39 -0700 (PDT) Original-Received: by 10.182.19.137 with HTTP; Thu, 10 May 2012 12:07:38 -0700 (PDT) In-Reply-To: <87pqacrunj.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59920 Archived-At: --e89a8fb1fe205d95db04bfb35576 Content-Type: text/plain; charset=UTF-8 Here are the tests when using the the latest cvs gdb that yields a gdb output file of about 800k. Without gdb-get-source-file-list override: ~139s With gdb-get-source-file-list override: ~125s Thus it is clear that most of the time is taken just reading the string into emacs. But doing find-file on the same file is almost instantaneous. Regards, Dov On Thu, May 10, 2012 at 5:13 PM, Chong Yidong wrote: > Dov Grobgeld writes: > > > Still, it bothering me the fact that the above perl expression parses > > the gdb output in a fraction of a second, (0.01s user time) whereas > > gdb-mi.el takes more than 40s. > > I would also like to learn more about where the bottleneck is. > > Could you do the following: > > M-: (require 'gdb-mi) RET > M-: (defun gdb-get-source-file-list () nil) RET > > then run M-x gdb as usual, and see if that makes any difference in > performance? Leave gdb-create-source-file-list set at t. > > (The above steps cause gdb-mi to issue the -file-list-exec-source-files > command and read the output, as usual, but skip parsing the output into > the source file list.) > --e89a8fb1fe205d95db04bfb35576 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here are the tes= ts when using the the latest cvs gdb that yields a gdb output file of about= 800k.

Without gdb-get-source-file-list override: ~139s
With gdb-= get-source-file-list override: ~125s

Thus it is clear that most of the time is taken just reading the string= into emacs. But doing find-file on the same file is almost instantaneous.<= br>
Regards,
Dov


On Thu,= May 10, 2012 at 5:13 PM, Chong Yidong <cyd@gnu.org> wrote:
Dov Grobgeld <dov.grobgeld@gmail.com> writes:
> Still, it bothering me the fact that the above perl expression parses<= br> > the gdb output in a fraction of a second, (0.01s user time) whereas > gdb-mi.el takes more than 40s.

I would also like to learn more about where the bottleneck is.

Could you do the following:

M-: (require 'gdb-mi) RET
M-: (defun gdb-get-source-file-list () nil) RET

then run M-x gdb as usual, and see if that makes any difference in
performance? =C2=A0Leave gdb-create-source-file-list set at t.

(The above steps cause gdb-mi to issue the -file-list-exec-source-files
command and read the output, as usual, but skip parsing the output into
the source file list.)

--e89a8fb1fe205d95db04bfb35576--