GNU bug report logs - #28704
27.0.50; Sorting packages list slow when using display-line-numbers-type visual

Previous Next

Package: emacs;

Reported by: Joseph Garvin <joe.garvin <at> radix-trading.com>

Date: Wed, 4 Oct 2017 16:26:02 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28704 in the body.
You can then email your comments to 28704 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28704; Package emacs. (Wed, 04 Oct 2017 16:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Garvin <joe.garvin <at> radix-trading.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Oct 2017 16:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph Garvin <joe.garvin <at> radix-trading.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50;
 Sorting packages list slow when using display-line-numbers-type visual
Date: Wed, 04 Oct 2017 11:14:56 -0500
Starting with emacs -Q:

Evaluate this in the scratch buffer:

;; make the packages list long enough to notice
(when (>= emacs-major-version 24)
  (require 'package)
  (package-initialize)
  (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
                           ("marmalade" . "https://marmalade-repo.org/packages/")
                           ("melpa-stable" . "http://stable.melpa.org/packages/")
                           ("melpa" . "https://melpa.org/packages/")))
  (when (not (package-installed-p 'use-package))
    (package-refresh-contents)
    (package-install 'use-package)))

;; enable mode to cause the problem
(when (>= emacs-major-version 26)
  (global-display-line-numbers-mode)
  (setq display-line-numbers-type 'visual))

Then run: M-x list-packages

Then click on one of the column headers to trigger sorting by that
column, e.g. Status. Emacs will freeze for a couple of minutes.

Profiler reveals:

- command-execute                                               25144  98%
 - call-interactively                                           25144  98%
  - funcall-interactively                                       25144  98%
   - tabulated-list-col-sort                                    24960  97%
    - tabulated-list--sort-by-column-name                       24960  97%
     - tabulated-list-print                                     24956  97%
      - apply                                                   24916  97%
       - tabulated-list-print-entry                             24903  97%
        - tabulated-list-line-number-width                      24736  96%
           #<compiled 0x2a38871>                                    2   0%

So it looks like all of the time is spent inside tabulated-list-line-number-width.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.14.13)
 of 2017-10-03 built on rdx-ws-030
Repository revision: 92045f4546b9708dc9f69954799d211c1f56ff1e
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description:	CentOS Linux release 7.3.1611 (Core)

Recent messages:
No more unseen articles
Mark set [4 times]
Quit
Type "q" in help window to restore its previous buffer, C-M-v to scroll help.
nnimap read 0k from imap.gmail.com
Saving file /home/jgarvin/.newsrc-dribble...
Wrote /home/jgarvin/.newsrc-dribble [2 times]
(Saved .newsrc-dribble)
Making find-file-hook buffer-local while locally let-bound!
Giving new frame mandimus cursor color. [3 times]

Configured using:
 'configure --prefix=/home/jgarvin/opt --with-x-toolkit=gtk3'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  recentf-mode: t
  global-subword-mode: t
  subword-mode: t
  drag-stuff-global-mode: t
  drag-stuff-mode: t
  winpoint-mode: t
  delete-selection-mode: t
  global-hl-line-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  helm-mode: t
  savehist-mode: t
  save-place-mode: t
  erc-services-mode: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-netsplit-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  projectile-global-mode: t
  projectile-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  helm-autoresize-mode: t
  override-global-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-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
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug helm-command helm-elisp helm-eval edebug eieio-opt
speedbar sb-image ezimage dframe help-fns radix-tree qp shr-color
rfc2104 cl-print debug mailalias smtpmail sendmail sort gnus-cite smiley
mail-extr gnus-async gnus-bcklg nnir winner gnus-ml nndraft nnmh
nnfolder utf-7 gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp
gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range
gnus-win gnus nnheader time cc-mode-expansions cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-git
elec-pair cus-edit cus-start cus-load hexl rect md-belt-impl misc paren
tramp-cache tramp-sh recentf tree-widget cap-words superword subword
drag-stuff winpoint delsel hl-line cyberpunk-theme ...)

Memory information:
((conses 16 808014 278796)
 (symbols 48 65569 8)
 (miscs 40 345 1483)
 (strings 32 196288 21363)
 (string-bytes 1 6314604)
 (vectors 16 106791)
 (vector-slots 8 2268095 150701)
 (floats 8 639 1928)
 (intervals 56 1103 789)
 (buffers 992 45)
 (heap 1024 96654 13947))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28704; Package emacs. (Thu, 05 Oct 2017 08:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 28704 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Joseph Garvin <joe.garvin <at> radix-trading.com>, 28704 <at> debbugs.gnu.org
Subject: Re: bug#28704: 27.0.50;
 Sorting packages list slow when using display-line-numbers-type visual
Date: Thu, 05 Oct 2017 10:09:25 +0200
> Then run: M-x list-packages
>
> Then click on one of the column headers to trigger sorting by that
> column, e.g. Status. Emacs will freeze for a couple of minutes.
>
> Profiler reveals:
>
> - command-execute                                               25144  98%
>   - call-interactively                                           25144  98%
>    - funcall-interactively                                       25144  98%
>     - tabulated-list-col-sort                                    24960  97%
>      - tabulated-list--sort-by-column-name                       24960  97%
>       - tabulated-list-print                                     24956  97%
>        - apply                                                   24916  97%
>         - tabulated-list-print-entry                             24903  97%
>          - tabulated-list-line-number-width                      24736  96%
>             #<compiled 0x2a38871>                                    2   0%
>
> So it looks like all of the time is spent inside tabulated-list-line-number-width.

‘tabulated-list-print’ should calculate ‘line-number-display-width’ once
and ‘tabulated-list-line-number-width’ should use that value.

martin





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 05 Oct 2017 09:45:02 GMT) Full text and rfc822 format available.

Notification sent to Joseph Garvin <joe.garvin <at> radix-trading.com>:
bug acknowledged by developer. (Thu, 05 Oct 2017 09:45:02 GMT) Full text and rfc822 format available.

Message #13 received at 28704-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: joe.garvin <at> radix-trading.com, 28704-done <at> debbugs.gnu.org
Subject: Re: bug#28704: 27.0.50;
 Sorting packages list slow when using display-line-numbers-type visual
Date: Thu, 05 Oct 2017 12:43:43 +0300
> Date: Thu, 05 Oct 2017 10:09:25 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> 
> ‘tabulated-list-print’ should calculate ‘line-number-display-width’ once
> and ‘tabulated-list-line-number-width’ should use that value.

Indeed, thanks.  I've made a similar change on the release branch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 Nov 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.