unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28704: 27.0.50; Sorting packages list slow when using display-line-numbers-type visual
@ 2017-10-04 16:14 Joseph Garvin
  2017-10-05  8:09 ` martin rudalics
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Garvin @ 2017-10-04 16:14 UTC (permalink / raw)
  To: 28704

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))





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-05  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 16:14 bug#28704: 27.0.50; Sorting packages list slow when using display-line-numbers-type visual Joseph Garvin
2017-10-05  8:09 ` martin rudalics
2017-10-05  9:43   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).