From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#25122: 24.5; function describe-variable hangs on large variables Date: Sat, 11 Mar 2017 20:34:09 +0100 Message-ID: <87k27vtxou.fsf@gmail.com> References: <20161206022112.GF25778@E15-2016.optimum.net> <87twahk19y.fsf@gmail.com> <87d1h4fld5.fsf@users.sourceforge.net> <871sxkyv2m.fsf@gmail.com> <87mvcs8j7w.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489260919 31384 195.159.176.226 (11 Mar 2017 19:35:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 19:35:19 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 25.1.2 Cc: 25122@debbugs.gnu.org, Boruch Baum To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 11 20:35:14 2017 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 1cmmnH-0007aV-Uu for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 20:35:12 +0100 Original-Received: from localhost ([::1]:44508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmmnM-0004zG-Fv for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 14:35:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmmnB-0004vh-Kb for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 14:35:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmmn8-0000sm-Ge for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 14:35:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmmn8-0000s9-BP for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 14:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cmmn8-0002JV-1s for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 14:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2017 19:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25122-submit@debbugs.gnu.org id=B25122.14892608618764 (code B ref 25122); Sat, 11 Mar 2017 19:35:01 +0000 Original-Received: (at 25122) by debbugs.gnu.org; 11 Mar 2017 19:34:21 +0000 Original-Received: from localhost ([127.0.0.1]:51746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmmmT-0002HH-JH for submit@debbugs.gnu.org; Sat, 11 Mar 2017 14:34:21 -0500 Original-Received: from mail-wr0-f194.google.com ([209.85.128.194]:34947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmmmR-0002Gk-Nt for 25122@debbugs.gnu.org; Sat, 11 Mar 2017 14:34:20 -0500 Original-Received: by mail-wr0-f194.google.com with SMTP id u108so15418809wrb.2 for <25122@debbugs.gnu.org>; Sat, 11 Mar 2017 11:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=CKlCMt4c5r7Gvfk3TsoFaiuYD7R79Gw66NhNWDXn4z8=; b=T4bpaDSwKRAtYU87a3UoBYzuzFBNU38ci/3J3IQf3/50AJvvY3kkCscgCshhaSTZfJ 6mxm0l+1rcvO5gB9JTopRsvIStFR7H2bcRmWoCQFre3OgKroRHFtSL0AfdpTfec01edX 25nNHkF6B0UiVOi2wzcU/d6pdUEgLNlWQbt5SyqWXN9OwOthZftFPgtZ3ZarxpzUSmfI o6Cf0kwDN8S8ClPYgCsjkn8YyANHrDUp1NRIHlni4WZ/lIsMzTPBp+jLCEh6qLz+Z5Z3 6sidMaHxWNYHjQG8FSm4i4YobH7ULhEke96YTj1/7aUmGrZ6x5XVdrmGplIbs03mb7th ziOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=CKlCMt4c5r7Gvfk3TsoFaiuYD7R79Gw66NhNWDXn4z8=; b=TY/dacatrBcrnqIQNRz0AWvjNey6CHR0eH9AzZTS0v0DxwqfV9Zewy6UPpLnHHPwMi /UOyHCeP86CWJM3EuP1m4lmPEzQFyLaIi94efXcdPHi4g+l8PRBGOq8S6Jml6E493pHx gX74vfzQmWDMQitXJtUIhMS5QngJqbDKWmGlCh2mDLSdaZEb11/CeYANaA0Qk8ZKyOx2 9iswEkuVWeZkKfmGvaFPf1bg/GninuUAxX64iXOaxdBHFDjc1s6ioAKBODfuaYjUilOz tmceIYCJhjSE+oDbtZLXmSDg3Zj6LGTt1dIHYZ6W/yhX2Dx7nAykeNmqwRFCW5hlJy1I 1p1g== X-Gm-Message-State: AMke39nntQ15aziAEMtPEnIHOztF+d/mvCvv5oVUBIlFntKxB8P6S+IROHKcJBPnnqb1+g== X-Received: by 10.223.160.115 with SMTP id l48mr23268773wrl.24.1489260854220; Sat, 11 Mar 2017 11:34:14 -0800 (PST) Original-Received: from dell-14z ([37.167.6.162]) by smtp.gmail.com with ESMTPSA id q75sm4683562wmd.27.2017.03.11.11.34.12 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 11 Mar 2017 11:34:13 -0800 (PST) In-reply-to: <87mvcs8j7w.fsf@users.sourceforge.net> 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:130499 Archived-At: npostavs@users.sourceforge.net writes: > I've been attempting an alternate approach which prettyprints the object > while scanning it instead of the current way of printing and then > reindenting. Without optimizing, it's about 3 times as fast as the > current pp (it's the pp-prin1 in the benchmarks below), though more than > 3 times slower than your mapc pp trick. On the other hand, it also > doesn't yet handle function-specific indentation or any compound > structure apart from lists, so I'm not sure if it will end up being much > faster. > > (benchmark 1 '(with-temp-buffer (pp-prin1 long-list (current-buffer)) nil)) "Elapsed time: 3.391232s (0.565806s in 11 GCs)" > (benchmark 1 '(progn (pp-to-string long-list) nil)) "Elapsed time: 9.988515s (0.148034s in 3 GCs)" > (benchmark 1 '(progn (with-output-to-string (mapc 'pp long-list)) nil)) "Elapsed time: 0.983493s (0.144424s in 3 GCs)" > (benchmark 1 '(progn (cl-prin1-to-string long-list) nil)) "Elapsed time: 0.511617s (0.152483s in 3 GCs)" > (benchmark 1 '(progn (prin1-to-string long-list) nil)) "Elapsed time: 0.029320s" Interesting, thanks to work on this. -- Thierry