From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#36566: 27.0.50; debug is sometimes horribly slow Date: Fri, 06 Sep 2019 09:41:05 -0700 Message-ID: <87mufh8jj2.fsf@runbox.com> References: <87r26yvb4r.fsf@web.de> <871ryy2l1t.fsf@gmail.com> <87r26xjyon.fsf@web.de> <877e8llbzo.fsf@runbox.com> <8736ilaepu.fsf@runbox.com> <87h871u24i.fsf@gmail.com> <874l2vcrtn.fsf@runbox.com> <874l2eosa7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140173"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: Michael Heerdegen , 36566@debbugs.gnu.org, Stefan Monnier To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 06 18:55:48 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i6HWT-000aIk-Pl for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2019 18:55:45 +0200 Original-Received: from localhost ([::1]:58734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6HWS-0002OB-Hg for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2019 12:55:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33454) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6HJG-0004sN-9s for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2019 12:42:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6HJF-0000aT-7D for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2019 12:42:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6HJE-0000a3-Ot for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2019 12:42:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i6HJE-0005LB-Gh for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2019 12:42:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Sep 2019 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36566 X-GNU-PR-Package: emacs Original-Received: via spool by 36566-submit@debbugs.gnu.org id=B36566.156778809720493 (code B ref 36566); Fri, 06 Sep 2019 16:42:02 +0000 Original-Received: (at 36566) by debbugs.gnu.org; 6 Sep 2019 16:41:37 +0000 Original-Received: from localhost ([127.0.0.1]:37294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6HIn-0005KS-2w for submit@debbugs.gnu.org; Fri, 06 Sep 2019 12:41:37 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:41370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6HIk-0005KF-Fe for 36566@debbugs.gnu.org; Fri, 06 Sep 2019 12:41:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=zerPfCtyJH+cBNd5Q5r7Tm4pJZAC8DWTrKqQA+If9Ps=; b=oGMgo14N4zyxRoU2goVOB/5BXS QwoSWrYRF8zUpOu0lfR8BYuFzrhRB9s/f9zQJfNd8w8GBGeOI0c4mt/pueTWTJB3LLd4qS8yKgSj5 RXWfOuQFbW6IUrfvw5bcPMm+DdfjxScZP6BXOnmyoYBsND3s8Pwbp2BcWWDdRhCn29bhWPaAU8KIF EMvg5ilo0YNdIhcEeMZW9tHTVUGThHMwnRyKGOm98q+ISOAOmAb04sUHdyS3xErUASATWv3HV75qK 6eIJdYfBmWdebzhrPvBiQRb7P9cNRJSUxhZ8qXcjZsNueaFufRa+m8WG128ReckRni6bO41x9ez9X NKXNavYQ==; Original-Received: from [10.9.9.202] (helo=mailfront20.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1i6HIh-0006h5-2c; Fri, 06 Sep 2019 18:41:31 +0200 Original-Received: by mailfront20.runbox with esmtpsa [Authenticated alias (696087)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1i6HIT-0007LS-Gp; Fri, 06 Sep 2019 18:41:18 +0200 In-Reply-To: <874l2eosa7.fsf@gmail.com> (Noam Postavsky's message of "Sun, 18 Aug 2019 21:30:56 -0400") 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: 209.51.188.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:166250 Archived-At: Noam Postavsky writes: >> Subject: [PATCH 2/5] Improve performance of backtrace printing (bug#36566) >> >> * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Reduce >> print-level and print-length more quickly when the structure being >> printed is very large. > > Is this one still needed? I tried reverting it, and it seems to make no > noticeable difference now (I didn't really measure though, I can't think > of a straightforward way of doing that), at least for the case that > Michael posted. My straightforward way of doing that is M-: (benchmark-run (revert-buffer)) RET while the backtrace buffer is current. I tried, with and without the patch, these steps: Navigate to org-export--prune-tree in ox.el. C-M-x to instrument it with Edebug. Open a 150K org-mode file. C-c C-e h H Edebug to line 2728 of ox.el (inside the lambda bound to 'walk-data'). Use 'd' to get a backtrace. M-: (benchmark-run (revert-buffer)) RET With the patch: (0.594630583 9 0.31395808699999783) Without the patch: (0.925387816 15 0.5158638049999986) I would expect that debugging deeper into org-mode export (so that there are more frames to display containing the org parse tree) with a larger org-mode file would exaggerate the difference. Edebug is very sluggish debugging org-export--prune-tree because it is sending some 400K lines to the echo area, and then those make *Messages* redisplay slow. I will work on another patch to improve Edebug's behavior in this case. >> Subject: [PATCH 4/5] Create common tests for print.c and cl-print.el > > Extra colon. > >> Subject: [PATCH 5/5] Don't build print-number-table unless it will be used > > We try not to use hashes to reference commits > I'll fix the patch comments as you suggest.