From unknown Wed Jun 18 23:14:07 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21717 <21717@debbugs.gnu.org> To: bug#21717 <21717@debbugs.gnu.org> Subject: Status: 24.5; describe-variable performances Reply-To: bug#21717 <21717@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:14:07 +0000 retitle 21717 24.5; describe-variable performances reassign 21717 emacs submitter 21717 Thierry Volpiatto severity 21717 minor tag 21717 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 20 02:14:55 2015 Received: (at submit) by debbugs.gnu.org; 20 Oct 2015 06:14:55 +0000 Received: from localhost ([127.0.0.1]:57320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoQCE-0004kw-Qr for submit@debbugs.gnu.org; Tue, 20 Oct 2015 02:14:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoQCC-0004ko-9q for submit@debbugs.gnu.org; Tue, 20 Oct 2015 02:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoQCA-0004Kf-J6 for submit@debbugs.gnu.org; Tue, 20 Oct 2015 02:14:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoQCA-0004Kb-Ei for submit@debbugs.gnu.org; Tue, 20 Oct 2015 02:14:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoQC8-0006pz-HL for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 02:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoQC5-0004Jy-7U for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 02:14:48 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:33881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoQC4-0004Jk-Up for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 02:14:45 -0400 Received: by wikq8 with SMTP id q8so29829823wik.1 for ; Mon, 19 Oct 2015 23:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:from:to:subject:date:message-id:mime-version :content-type; bh=ukpMTcqq12q8KqsOUQpeExrf1wOO5qeZU7j071a/xr0=; b=ytJjpVm+YYdglVkJD9W3ZGYhf/h0Emb+yGeKU1OxzhnLbCLw5nhprby2dHli3LHsqV 0BQLmry8hQSgG2NPd2K/VokmL9iSOxJXxNG4B6m8BfsPppLLIBlsQLy9RCs0aluVavl6 Y83GeTtrM7mvmAsseoktHmyD20N4onVy+OhfM3xOaZOcxZpoLCSMK1krZL0cGPQUwIUU 2Ui55VTpbej7xywgIujp01ZFEx2Zl87mvgz5lfQs5xl+fck1clfIO/+2Uaqig+KTwHTk wO5vv4u1jJp5VTaW9iKyLEHK919PGlQy+35ncDmpACg1AYy5wEhzdWEpn15rbbGU1ZTA y/cQ== X-Received: by 10.194.90.169 with SMTP id bx9mr1887005wjb.1.1445321683898; Mon, 19 Oct 2015 23:14:43 -0700 (PDT) Received: from dell-14z ([37.163.70.4]) by smtp.gmail.com with ESMTPSA id bk4sm1670249wjc.1.2015.10.19.23.14.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 19 Oct 2015 23:14:42 -0700 (PDT) User-agent: mu4e 0.9.13; emacs 24.5.1 From: Thierry Volpiatto To: bug-gnu-emacs@gnu.org Subject: 24.5; describe-variable performances Date: Tue, 20 Oct 2015 08:14:35 +0200 Message-ID: <8737x6dq2c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) `describe-variable' can be optimized to popup faster when printing the value of variable. (describe-variable 'load-history) => describe-variable 1 52.717248403 52.717248403 Now applying following patch: --8<---------------cut here---------------start------------->8--- @@ -763,7 +763,9 @@ it is displayed along with the global value." (if (< (+ (length print-rep) (point) (- line-beg)) 68) (insert print-rep) (terpri) - (pp val) + (if (listp val) + (progn (insert "(") (mapc 'pp val) (insert ")")) + (pp val)) (if (< (point) (+ 68 (line-beginning-position 0))) (delete-region from (1+ from)) (delete-region (1- from) from))) --8<---------------cut here---------------end--------------->8--- (describe-variable 'load-history) => describe-variable 1 1.283377719 1.283377719 PS: This is just informative in case you want to optimize it, don't expect me to provide a fully polished fix for this. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, X toolkit) of 2015-04-12 on dell-14z Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.3 LTS Configured using: `configure --with-x-toolkit=lucid --without-toolkit-scroll-bars --without-gconf --without-gsettings' Important settings: value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t global-git-commit-mode: t recentf-mode: t global-git-gutter-mode: t git-gutter-mode: t eldoc-in-minibuffer-mode: t global-undo-tree-mode: t undo-tree-mode: t dired-async-mode: t golden-ratio-mode: t psession-mode: t helm-descbinds-mode: t helm-push-mark-mode: t eldoc-mode: t helm-mode: t shell-dirtrack-mode: t helm-adaptive-mode: t async-bytecomp-package-mode: t winner-mode: t auto-image-file-mode: t minibuffer-depth-indicate-mode: t show-paren-mode: t savehist-mode: t display-time-mode: t override-global-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Type "q" to restore previous buffer. Quit Switching to Emacs lisp indenting style. Saving file /home/thierry/labo/emacs/lisp/help-fns.el... Wrote /home/thierry/.emacs.d/undo-tree-history/.!home!thierry!labo!emacs!lisp!help-fns.el.~undo-tree~ Wrote /home/thierry/labo/emacs/lisp/help-fns.el (No changes need to be saved) C-x C-g is undefined Quit Mark set [2 times] Load-path shadows: /home/thierry/.emacs.d/elpa/emms-20150810.832/tq hides /usr/local/share/emacs/24.5/lisp/emacs-lisp/tq ~/elisp/google-maps hides ~/elisp/google-maps.el/google-maps ~/elisp/auctex/lpath hides ~/elisp/emacs-wget/lpath Features: (shadow emacsbug whitespace view eieio-opt cl-indent elp helm-command linum magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit add-log with-editor dash helm-ls-git vc-git vc tramp-cache tramp-sh recentf flow-fill mm-archive gnus-html url-cache mm-url gnus-cite gnus-async gnus-bcklg qp gnus-ml nndraft nnmh nnml nnfolder parse-time epa-file netrc gnutls network-stream starttls tls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache smtpmail-async mail-extr sort tv-utils pcvs vc-cvs pcvs-parse pcvs-info pcvs-defs pcvs-util ewoc helm-dabbrev gnus-dired nnir epa-mail helm-imenu imenu smiley gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader w3m-form mule-util addressbook-bookmark mu4e-config config-w3m w3m-search w3m timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util org-mu4e helm-mu mu4e-contrib mu4e mu4e-speedbar speedbar sb-image ezimage dframe mu4e-main mu4e-view epa derived epg mu4e-headers mu4e-compose mu4e-draft mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark mu4e-message html2text mu4e-proc mu4e-utils doc-view image-mode mu4e-lists mu4e-vars message rfc822 mml mml-sec mailabbrev mail-utils gmm-utils mailheader hl-line mu4e-meta package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums lisp-mnt sh-script smie executable jedi auto-complete popup jedi-core python-environment epc ctable concurrent deferred cl flymake-python-pyflakes flymake-easy flymake python json vc-rcs ledger-config ledger conf-mode cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-dispatcher vc-hg jka-compr checkdoc help-mode naquadah-theme em-unix em-term term disp-table ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic em-banner em-alias server align-let esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util markdown-mode preview-latex tex-site auto-loads slime-xref-browser tree-widget slime-banner slime-tramp slime-asdf slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations bridge slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl slime-parse slime etags arc-mode archive-mode hyperspec git-gutter ange-ftp xdvi-search eldoc-eval warnings undo-tree dired-async migemo xmodmap pcomplete-extension pcmpl-unix pcmpl-gnu golden-ratio psession iterator iedit iedit-lib dired-extension org-config-thierry ob-sh org-crypt org-annotation-helper org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs init-helm-thierry helm-descbinds helm-extensions-autoloads helm-ring helm-elisp helm-eval edebug eldoc helm-mode helm-files rx image-dired tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec dired-x dired-aux ffap thingatpt helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info bookmark pp helm-locate helm-grep wgrep-helm wgrep grep helm-regexp helm-plugin helm-external helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source gnus-util mm-util mail-prsvr password-cache url-vars mailcap helm-utils compile comint ansi-color helm-help helm-types helm helm-source helm-multi-match helm-lib dired helm-config helm-autoloads helm-easymenu cl-macs gv async-bytecomp async helm-aliases net-utils w3m-wget advice help-fns winner ring diff cus-edit wid-edit image-file mb-depth paren savehist edmacro kmacro time use-package diminish bind-key easy-mmode eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core go-mode-autoloads slime-autoloads info easymenu package epg-config time-date avoid cus-start cus-load cl-loaddefs cl-lib tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting font-render-setting x-toolkit x multi-tty emacs) Memory information: ((conses 16 731482 76450) (symbols 48 69449 0) (miscs 40 12685 1190) (strings 32 197064 30786) (string-bytes 1 5715714) (vectors 16 76511) (vector-slots 8 2018376 20080) (floats 8 2034 843) (intervals 56 9579 849) (buffers 960 210) (heap 1024 93402 5303)) -- Thierry https://emacs-helm.github.io/helm/ From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 20 04:03:05 2015 Received: (at 21717) by debbugs.gnu.org; 20 Oct 2015 08:03:05 +0000 Received: from localhost ([127.0.0.1]:57397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoRsv-0007Kk-Do for submit@debbugs.gnu.org; Tue, 20 Oct 2015 04:03:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:36890) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoRsr-0007KI-K2 for 21717@debbugs.gnu.org; Tue, 20 Oct 2015 04:03:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A1F04AAD1; Tue, 20 Oct 2015 08:02:59 +0000 (UTC) From: Andreas Schwab To: Thierry Volpiatto Subject: Re: bug#21717: 24.5; describe-variable performances References: <8737x6dq2c.fsf@gmail.com> X-Yow: TAPPING? You POLITICIANS! Don't you realize that the END of the ``Wash Cycle'' is a TREASURED MOMENT for most people?! Date: Tue, 20 Oct 2015 10:03:00 +0200 In-Reply-To: <8737x6dq2c.fsf@gmail.com> (Thierry Volpiatto's message of "Tue, 20 Oct 2015 08:14:35 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21717 Cc: 21717@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Thierry Volpiatto writes: > @@ -763,7 +763,9 @@ it is displayed along with the global value." > (if (< (+ (length print-rep) (point) (- line-beg)) 68) > (insert print-rep) > (terpri) > - (pp val) > + (if (listp val) > + (progn (insert "(") (mapc 'pp val) (insert ")")) The problem with that is that it breaks printing cyclic structures. If val itself is a cycle you are stuck here. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 06 11:46:24 2016 Received: (at control) by debbugs.gnu.org; 6 Dec 2016 16:46:24 +0000 Received: from localhost ([127.0.0.1]:58434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEIsp-0001ay-R9 for submit@debbugs.gnu.org; Tue, 06 Dec 2016 11:46:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEIso-0001an-In for control@debbugs.gnu.org; Tue, 06 Dec 2016 11:46:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEIsf-0001QP-ND for control@debbugs.gnu.org; Tue, 06 Dec 2016 11:46:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEIsf-0001QL-Jv for control@debbugs.gnu.org; Tue, 06 Dec 2016 11:46:13 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cEIsf-0005oT-99 for control@debbugs.gnu.org; Tue, 06 Dec 2016 11:46:13 -0500 Subject: control message for bug 25122 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 06 Dec 2016 11:46:13 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) forcemerge 21717 25122 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 06 22:49:54 2016 Received: (at control) by debbugs.gnu.org; 7 Dec 2016 03:49:54 +0000 Received: from localhost ([127.0.0.1]:58676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cETEv-0001VM-V9 for submit@debbugs.gnu.org; Tue, 06 Dec 2016 22:49:54 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:34975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cETEu-0001V7-J8; Tue, 06 Dec 2016 22:49:52 -0500 Received: by mail-io0-f193.google.com with SMTP id h133so25679279ioe.2; Tue, 06 Dec 2016 19:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fOUiZOxPeB0yjhSpA/vp9gH6BJ502VIMjT5X31O30lY=; b=BOjar0fTigaemD2PpzBblHytioOYTrCkMdGVSZ5YJW0cLS15gHgjvsehA6ir7vziUt ilDkhaZcAm/CSm7UoiePjlSRbXvj9JxyhfZyuBfKrJ3pQtUQHJtPd6EglXQ2b0+g07Iz s97XT3IA+jYKHtF/S7ljpvHidZQ06W1mETvvoiBZBpwuflV44inQKHNCOPGBhdfH41Jn r0drHKI2tr5ysq0L82cH0kNN8bI09rlWGUWJpjhUNZz0T6+kHqUUYIB3z+2cG73RVjcb CTFQ7BpFuiFtoJiHakVbLGUgpfyqIZvnu6IElELWWuS8sb6ZjWn3SHZofP871z1oDgk6 2Sag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=fOUiZOxPeB0yjhSpA/vp9gH6BJ502VIMjT5X31O30lY=; b=AzmV/NSoj78x6j+ioyRjoKVPOvttN1KLhwOxuEiqtdqFezJmCPBGhOr90Jtbcul9Bi DEvUajM5SrqCgkwU/QHWlKBM6VpljR4E7i8AW4fCUR28ZxvitGEsEnKUdJQ+LaHkZWS9 qxzZo9oNOpeLt8XVzpUYP7iVfHGn6ONRePa6a7ylE0eIpwSvyVzjj08c2kc1woDDBvR7 l7PHyZOj8jckIHH8Sap5uMKHHvviKa3QrL3LXZjA8KecUusHp14xErSUmx/WW7nSG6nt Uvwqn/W2nm1oXACfi+NYG3FLVPIVbWOedM9Of3rfRGCBms2RnTUfKhGYbCvtuIxvUSsf 6lhw== X-Gm-Message-State: AKaTC00txrM+UisMmVJM0ncBdwmIgDHWeAx+WZB3B5jwxM7sVRLKq8I+f7WSXsAfop1Ftg== X-Received: by 10.36.127.84 with SMTP id r81mr548332itc.57.1481082587067; Tue, 06 Dec 2016 19:49:47 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 9sm2753553itv.0.2016.12.06.19.49.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Dec 2016 19:49:46 -0800 (PST) From: npostavs@users.sourceforge.net To: Thierry Volpiatto Subject: Re: bug#25122: 24.5; function describe-variable hangs on large variables References: <20161206022112.GF25778@E15-2016.optimum.net> <87twahk19y.fsf@gmail.com> Date: Tue, 06 Dec 2016 22:50:46 -0500 In-Reply-To: <87twahk19y.fsf@gmail.com> (Thierry Volpiatto's message of "Tue, 06 Dec 2016 07:41:13 +0100") Message-ID: <87d1h4fld5.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 25122@debbugs.gnu.org, Boruch Baum X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) merge 13439 25122 quit Thierry Volpiatto writes: > Boruch Baum writes: > >> Subject: 24.5; function describe-variable hangs on large variables >> >> 1) When evaluating function describe-variable for variable >> package-archive-conteqnts, emacs hangs for minutes before I gave up. > > I have already reported this bug. > I use this to workaround it: I wonder if the suggestion in #13439 might also help? From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 13 00:46:30 2017 Received: (at control) by debbugs.gnu.org; 13 Mar 2017 04:46:30 +0000 Received: from localhost ([127.0.0.1]:53127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnHsL-0001my-Tw for submit@debbugs.gnu.org; Mon, 13 Mar 2017 00:46:30 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:37445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnHsJ-0001mg-M6; Mon, 13 Mar 2017 00:46:28 -0400 Received: by mail-it0-f43.google.com with SMTP id g138so25236000itb.0; Sun, 12 Mar 2017 21:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+HVfNan0vzQbhsFpVI3DS0tkNCwHH97eXeXRsVbcBjo=; b=UMY3uVeUNDTxRdi96i2yfH4q5h/D3IQ484RDHqw1DV4ksKrxqvreNjtECcGYj142Np nGyXxMm2Jpw0KIlkJzYFEi+zIfPdIy2HR6HPfigAE10BUKhx8I1ArHbj4an+pnNTOlXg jearI/37Rsa/alLW/FbqUgipgqTkpfjMIgml7i9fm1XGyCsdIVY6Z0MSIs+Oc8PAS3+w 7eigdt7alR4kw7zV9ik7K87Co9lzqQlQbtC99Mh0fpQ8DgK2r16EFy4RmtwrlqXn/Mfp 9QqBucgg+WQuIL3jXnm5mkI/QPs/Yj0u6Wj9jAPSQdp3YALlJ4mkMoGEt53OK4MrXrUy 0zvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=+HVfNan0vzQbhsFpVI3DS0tkNCwHH97eXeXRsVbcBjo=; b=ZUfrUTyAjt21TtuMJH3LlolP5XMwjccEf5Wjkg/PABbuNmnf3nZr3keKO5qpdSEJKX 87MPQxxvE9F5sP6kp7Rv8ChSO+BVK+KaMUoiaMgyRcPxLj+v8/qKaZ2w2u1Mk4zHNogF CC1lWzG0WF9mo75/rmyfhrr0UuFyxUy7KKnBB88P6zOT0dJT9ljx0sTQm2wI4BkLqrjC uPb+Tmnlw4jw5eVVuaNywfHXQr8g9dfesJv6iV5Os20MFJqMGwIATDOK5JMSKJ3/yzQd ErQYYU1Rvr4ejq15x2IPW4pOJUWQz2Gno36kGAM6OJ/68iI5klsmTlUQBaO6d8/wzOtn i8hg== X-Gm-Message-State: AFeK/H3d87TE8551ojJet+4S4hGDfh0WO1KWmsvoXP3CiUAjC4Z3ZaZuoou3OoGw/f+dwA== X-Received: by 10.36.153.197 with SMTP id a188mr9297425ite.5.1489380382055; Sun, 12 Mar 2017 21:46:22 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 62sm3744204itl.1.2017.03.12.21.46.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Mar 2017 21:46:21 -0700 (PDT) From: npostavs@users.sourceforge.net To: Thierry Volpiatto Subject: Re: bug#25122: 24.5; function describe-variable hangs on large variables 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> <87lgsbtxwe.fsf@gmail.com> <871su38ogm.fsf@users.sourceforge.net> <87d1dnrq96.fsf@gmail.com> <87wpbu7f9i.fsf@users.sourceforge.net> <87r32278wf.fsf@users.sourceforge.net> Date: Mon, 13 Mar 2017 00:47:38 -0400 In-Reply-To: <87r32278wf.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sun, 12 Mar 2017 12:32:48 -0400") Message-ID: <87lgs97pg5.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control Cc: 25122@debbugs.gnu.org, Stefan Monnier , Boruch Baum X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain tags 25122 patch quit npostavs@users.sourceforge.net writes: > Also, this doesn't really solve the performance problem, it just makes > it much less likely to occur, e.g., (pp (list load-history)) is still > slow. Okay, I think I found the real fix now: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Don-t-reparse-the-sexp-in-indent-sexp-Bug-25122.patch Content-Description: patch >From 5188d6e366426d83934505296b585744f50e24a5 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 12 Mar 2017 23:59:19 -0400 Subject: [PATCH] Don't reparse the sexp in indent-sexp (Bug#25122) * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let PARSE-START be a parse state that can be reused. (indent-sexp): Pass the running parse state to calculate-lisp-indent instead of the sexp beginning position. --- lisp/emacs-lisp/lisp-mode.el | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index eb07c18b03..8d4abc24e8 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -781,6 +781,10 @@ calculate-lisp-indent If the value is nil, that means don't change the indentation because the line starts inside a string. +PARSE-START may be a buffer position to start parsing from, or a +parse state as returned by calling `parse-partial-sexp' up to the +beginning of the current line. + The value can also be a list of the form (COLUMN CONTAINING-SEXP-START). This means that following lines at the same level of indentation should not necessarily be indented the same as this line. @@ -794,12 +798,14 @@ calculate-lisp-indent (desired-indent nil) (retry t) calculate-lisp-indent-last-sexp containing-sexp) - (if parse-start - (goto-char parse-start) - (beginning-of-defun)) - ;; Find outermost containing sexp - (while (< (point) indent-point) - (setq state (parse-partial-sexp (point) indent-point 0))) + (cond ((or (markerp parse-start) (integerp parse-start)) + (goto-char parse-start)) + ((null parse-start) (beginning-of-defun)) + (t (setq state parse-start))) + (unless state + ;; Find outermost containing sexp + (while (< (point) indent-point) + (setq state (parse-partial-sexp (point) indent-point 0)))) ;; Find innermost containing sexp (while (and retry state @@ -1070,11 +1076,6 @@ indent-sexp ENDPOS is encountered." (interactive) (let* ((indent-stack (list nil)) - ;; If ENDPOS is non-nil, use beginning of defun as STARTING-POINT. - ;; If ENDPOS is nil, it is safe not to scan before point - ;; since every line we indent is more deeply nested than point is. - (starting-point (save-excursion (if endpos (beginning-of-defun)) - (point))) ;; Use `syntax-ppss' to get initial state so we don't get ;; confused by starting inside a string. We don't use ;; `syntax-ppss' in the loop, because this is measurably @@ -1132,8 +1133,12 @@ indent-sexp (unless (or (eolp) (eq (char-syntax (char-after)) ?<)) (let ((this-indent (car indent-stack))) (when (listp this-indent) - (let ((val (calculate-lisp-indent - (or (car this-indent) starting-point)))) + ;; The state here is actually to the end of the + ;; previous line, but that's fine for our purposes. + ;; And continuing the parse to the next line would + ;; destroy element 2 (last sexp position) which + ;; `calculate-lisp-indent' needs. + (let ((val (calculate-lisp-indent state))) (setq this-indent (cond ((integerp val) -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 22 14:24:04 2017 Received: (at control) by debbugs.gnu.org; 22 Apr 2017 18:24:04 +0000 Received: from localhost ([127.0.0.1]:34666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1zhU-0005rx-Gd for submit@debbugs.gnu.org; Sat, 22 Apr 2017 14:24:04 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:33651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1zhT-0005rP-9s; Sat, 22 Apr 2017 14:24:03 -0400 Received: by mail-it0-f66.google.com with SMTP id z67so5860187itb.0; Sat, 22 Apr 2017 11:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=EmOKstKSIMAmqrj6uwsHED6XBgSQ74VP3nzKYsKlZ6Q=; b=VmIWyi4T6aAjuAdfzWrf+j0/kbWZYD1APu7GFv6NGgQ1fKkPbIRckojRiYyr7THot/ j9n1lUFBWWCeVu7X+9eY7iIQQaZupDGocZ/oqQNrvxKIJekM0ONq7vSJWJ3T9Q/dnW3R 07ObNeGY53Zcq+eBFPoA81xAEVPd6C+264SY6Lz+E2t7lp92Bn+1SkVQxJISzJlGaGo2 DRCD2ALUrF7V6N8DQNDaP2HEiSCmYDSOv3jrsSsHBcvMkEDz1iouBI5nEDFD85FkkTnX 4KjpwM9Wt6zp8gGO8JNDJf3/rsINxg7+YMFfUJpCV5ktbC/Y4CYKGwjArtvATe4NVmeg kJBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=EmOKstKSIMAmqrj6uwsHED6XBgSQ74VP3nzKYsKlZ6Q=; b=ZMCt55TuRWfTL5qRaDMeshpew6lAi/s42l4Ub4gs4uNV4NgTmwyd8WXIzqe02XbUVQ mL//foI18pnsg74fkWfP5Gs/ASPFL9ZXMU8gNAxFHzII/rQ00c0SZr+Ew73Mn62e5L0Y df1tntQIB2XUFbief6lr/twmCdIri5aNA3/SPpVAMyG+rCUmyHlt0nR4k1nwzL1/ojrp +Ug4HmHyEZ1JEcr6b31dDAHG6i9sjlt09DgFDbrjFFbwcB8Tssyph3ZOflEF6C1MUlU3 w0bXiSGhgJDog1awDEqqzNjn9C3M4iWk8yv80ZHUAHxjGNGQJerSgmOicmuI9hdTdaOU 1tDQ== X-Gm-Message-State: AN3rC/7iyNEfMbiiRkjCXO9vEirvm2CoPPYi5Dq4gSfErQ815WtVa4nD aCBU9prW6FXUKw== X-Received: by 10.36.95.144 with SMTP id r138mr5227406itb.11.1492885437857; Sat, 22 Apr 2017 11:23:57 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e191sm2233256ita.9.2017.04.22.11.23.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Apr 2017 11:23:57 -0700 (PDT) From: npostavs@users.sourceforge.net To: Thierry Volpiatto Subject: Re: bug#25122: 24.5; function describe-variable hangs on large variables 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> <87lgsbtxwe.fsf@gmail.com> <871su38ogm.fsf@users.sourceforge.net> <87d1dnrq96.fsf@gmail.com> <87wpbu7f9i.fsf@users.sourceforge.net> <87r32278wf.fsf@users.sourceforge.net> <87lgs97pg5.fsf@users.sourceforge.net> <87innd6zti.fsf@users.sourceforge.net> <878to653tr.fsf@users.sourceforge.net> <87fuh6s75x.fsf@users.sourceforge.net> Date: Sat, 22 Apr 2017 14:25:27 -0400 In-Reply-To: <87fuh6s75x.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Mon, 17 Apr 2017 23:53:30 -0400") Message-ID: <87mvb8paeg.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control Cc: 25122@debbugs.gnu.org, Stefan Monnier , Boruch Baum X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 25122 fixed close 25122 26.1 quit npostavs@users.sourceforge.net writes: > > I intend to close this bug as fixed after merging these, as this does > fix the performance bug. Pushed to master. [1: 6fa9cc0593]: 2017-04-22 14:18:46 -0400 ; Merge: improve indent-sexp and lisp-indent-region performance http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6fa9cc0593150a318f0e08e69ec10672d548a7c1 [2: 4713dd425b]: 2017-04-22 14:09:58 -0400 Add new `lisp-indent-region' that doesn't reparse the code. http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4713dd425beac5cb459704e67dcb8f6faf714375 [3: 2f6769f9cd]: 2017-04-22 14:09:58 -0400 Remove ignored argument from lisp-indent-line http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=2f6769f9cdb799e880fdcc09057353a0a2349bfc [4: 8bb5d7adaf]: 2017-04-22 14:09:57 -0400 * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker. http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=8bb5d7adaf45264900385530c7f76175ba490a77 [5: 43c84577a3]: 2017-04-22 14:09:57 -0400 Don't reparse the sexp in indent-sexp (Bug#25122) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=43c84577a3055d5ddf1f5d1b999e6ecca6139f60 From unknown Wed Jun 18 23:14:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 May 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator