unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23928: 25.0.95; Performance regression observable with smartparens
@ 2016-07-09 14:56 Aaron Jensen
  2016-07-09 15:53 ` Noam Postavsky
  2016-07-09 16:50 ` Eli Zaretskii
  0 siblings, 2 replies; 22+ messages in thread
From: Aaron Jensen @ 2016-07-09 14:56 UTC (permalink / raw)
  To: 23928

[-- Attachment #1: Type: text/plain, Size: 28688 bytes --]

When compared to emacs 24.5, smartparens is now nearly unusable in emacs
25. I'm not familiar enough with emacs to track down the specific
performance regression, but it appears to be regular expression or
save-excursion related. This is the function that shows up hot on
profiles:

https://github.com/Fuco1/smartparens/blob/1d858a9ec235cef5285503b6bb34be84cc3f5aa3/smartparens.el#L3621-L3646

Here is one such example profile:

- command-execute                                               20509  84%
 - call-interactively                                           20459  84%
  - funcall-interactively                                       19411  80%
   - self-insert-command                                        10642  43%
    - sp--post-self-insert-hook-handler                         10642  43%
     - sp-insert-pair                                            5531  22%
      - sp--pair-to-insert                                       5126  21%
       - sp--all-pairs-to-insert                                 5116  21%
        - sp--looking-back-p                                     5107  21%
         - sp--looking-back                                      4620  19%
            sp--looking-at                                          7   0%
           #<compiled 0x2b3d647>                                    4   0%
        + sp--do-action-p                                           5   0%
          sp--strict-regexp-quote                                   4   0%
      + sp--pair-to-uninsert                                      405   1%
     - sp--all-pairs-to-insert                                   5111  21%
      - sp--looking-back-p                                       5111  21%
       - sp--looking-back                                        4642  19%
          sp--looking-at                                            3   0%
         #<compiled 0x2b3d647>                                      4   0%
   + file-notify-handle-event                                    7947  32%
   + newline-and-indent                                           745   3%

The issue was originally reported here as an issue in smartparens:

https://github.com/Fuco1/smartparens/issues/595

Since it appears to be an emacs regression, I figured I would report it
here as well. Thanks!

In GNU Emacs 25.0.95.1 (x86_64-apple-darwin15.5.0, NS appkit-1404.47
Version 10.11.5 (Build 15F34))
 of 2016-06-10 built on aaronmbp.local
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/25.0.95/share/info/emacs
 --prefix=/usr/local/Cellar/emacs/25.0.95 --with-xml2 --without-dbus
 --with-gnutls --with-rsvg --with-imagemagick --with-ns
 --disable-ns-self-contained'

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dockerfile

Minor modes in effect:
  helm-descbinds-mode: t
  magit-auto-revert-mode: t
  goto-address-prog-mode: t
  bug-reference-prog-mode: t
  auto-highlight-symbol-mode: t
  clean-aindent-mode: t
  highlight-numbers-mode: t
  highlight-parentheses-mode: t
  rainbow-delimiters-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  projectile-global-mode: t
  projectile-mode: t
  recentf-mode: t
  shackle-mode: t
  global-hungry-delete-mode: t
  hungry-delete-mode: t
  evil-mc-mode: t
  hl-todo-mode: t
  global-spacemacs-whitespace-cleanup-mode: t
  spacemacs-whitespace-cleanup-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  winner-mode: t
  window-numbering-mode: t
  volatile-highlights-mode: t
  global-vi-tilde-fringe-mode: t
  vi-tilde-fringe-mode: t
  spaceline-info-mode: t
  spaceline-helm-mode: t
  save-place-mode: t
  savehist-mode: t
  popwin-mode: t
  persp-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  ido-vertical-mode: t
  helm-mode: t
  global-git-gutter+-mode: t
  git-gutter+-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  flyspell-mode: t
  global-flycheck-mode: t
  flx-ido-mode: t
  eyebrowse-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-evil-search-highlight-persist: t
  evil-search-highlight-persist: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-mode: t
  evil-escape-mode: t
  global-anzu-mode: t
  anzu-mode: t
  eval-sexp-fu-flash-mode: t
  hybrid-mode: t
  which-key-mode: t
  override-global-mode: t
  spacemacs-leader-override-mode: t
  global-spacemacs-leader-override-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-mode: t
  evil-local-mode: t
  diff-auto-refine-mode: t
  global-hl-line-mode: t
  xterm-mouse-mode: t
  global-auto-revert-mode: t
  global-page-break-lines-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-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
  abbrev-mode: t
  hs-minor-mode: t

Recent messages:
(No changes need to be saved)
Saving file /Users/aaronjensen/.emacs.d/.cache/recentf...
Wrote /Users/aaronjensen/.emacs.d/.cache/recentf
Error during redisplay: (eval (spaceline-ml-main)) signaled
(wrong-type-argument stringp nil)
When done with a buffer, type C-x #
Mark set
Saving file /Users/aaronjensen/Source/hex_repro/mix.exs...
Wrote /Users/aaronjensen/Source/hex_repro/mix.exs
Saving file /Users/aaronjensen/.emacs.d/.cache/recentf...
Wrote /Users/aaronjensen/.emacs.d/.cache/recentf

Load-path shadows:
/Users/aaronjensen/.emacs.d/elpa/helm-20160705.144/helm-multi-match hides
/Users/aaronjensen/.emacs.d/elpa/helm-core-20160701.2319/helm-multi-match
/Users/aaronjensen/.emacs.d/elpa/ox-gfm-20160520.2040/ox-gfm hides
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-gfm
/Users/aaronjensen/.emacs.d/elpa/org-download-20160620.607/org-download
hides
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-download
/Users/aaronjensen/.emacs.d/elpa/org-bullets-20140918.1137/org-bullets
hides /Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-bullets
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-texinfo hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-texinfo
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-publish hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-publish
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-org hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-org
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-odt hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-odt
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-md hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-md
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-man hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-man
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-latex hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-latex
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-icalendar
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-icalendar
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-html hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-html
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-beamer hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-beamer
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ox-ascii hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ox-ascii
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-w3m hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-w3m
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-version
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-version
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-timer hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-timer
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-table hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-table
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-src hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-src
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-rmail hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-rmail
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-protocol
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-protocol
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-plot hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-plot
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-pcomplete
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-pcomplete
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-mouse hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-mouse
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-mobile hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-mobile
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-mhe hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-mhe
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-macs hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-macs
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-macro hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-macro
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-loaddefs
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-loaddefs
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-list hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-list
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-irc hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-irc
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-install
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-install
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-inlinetask
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-inlinetask
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-info hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-info
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-indent hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-indent
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-id hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-id
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-habit hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-habit
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-gnus hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-gnus
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-footnote
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-footnote
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-feed hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-feed
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-faces hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-faces
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-eshell hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-eshell
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-entities
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-entities
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-element
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-element
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-docview
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-docview
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-datetree
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-datetree
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-ctags hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-ctags
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-crypt hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-crypt
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-compat hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-compat
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-colview
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-colview
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-clock hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-clock
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-capture
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-capture
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-bibtex hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-bibtex
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-bbdb hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-bbdb
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-attach hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-attach
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-archive
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-archive
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/org-agenda hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/org-agenda
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-tangle hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-tangle
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-table hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-table
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-sqlite hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-sqlite
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-sql hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-sql
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-shen hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-shen
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-screen hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-screen
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-scheme hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-scheme
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-scala hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-scala
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-sass hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-sass
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-ruby hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-ruby
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-ref hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-ref
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-R hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-R
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-python hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-python
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-plantuml
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-plantuml
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-picolisp
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-picolisp
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-perl hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-perl
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-org hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-org
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-octave hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-octave
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-ocaml hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-ocaml
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-mscgen hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-mscgen
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-maxima hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-maxima
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-matlab hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-matlab
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-makefile
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-makefile
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-lob hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-lob
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-lisp hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-lisp
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-lilypond
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-lilypond
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-ledger hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-ledger
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-latex hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-latex
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-keys hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-keys
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-js hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-js
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-java hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-java
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-io hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-io
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-haskell hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-haskell
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-gnuplot hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-gnuplot
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-fortran hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-fortran
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-exp hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-exp
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-eval hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-eval
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-emacs-lisp
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-emacs-lisp
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-dot hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-dot
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-ditaa hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-ditaa
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-css hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-css
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-core hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-core
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-comint hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-comint
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-clojure hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-clojure
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-calc hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-calc
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-C hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-C
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-awk hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-awk
/Users/aaronjensen/.emacs.d/elpa/org-plus-contrib-20160704/ob-asymptote
hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/org/ob-asymptote
/Users/aaronjensen/.emacs.d/elpa/seq-2.16/seq hides
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/emacs-lisp/seq

Features:
(shadow sort mail-extr emacsbug sendmail alchemist alchemist-macroexpand
alchemist-company alchemist-help alchemist-complete alchemist-refcard
alchemist-phoenix alchemist-compile alchemist-iex alchemist-message
alchemist-hooks alchemist-hex alchemist-mix alchemist-info
alchemist-goto alchemist-scope alchemist-eval alchemist-interact
alchemist-server alchemist-execute alchemist-report alchemist-test-mode
alchemist-project alchemist-file alchemist-key alchemist-utils
elixir-mode pkg-info epl elixir-smie company-web-html emmet-mode
web-mode dockerfile-mode json-mode json-reformat json-snatcher js imenu
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs markdown-mode helm-ag flycheck-elm company-robe
evil-matchit robe inf-ruby rubocop ruby-tools gitignore-mode conf-mode
term/xterm xterm deft calc calc-loaddefs calc-macs cua-base org-eldoc
evil-org ob-shell org-bullets org-download toc-org ert debug image-file
org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view
jka-compr org-bibtex bibtex org-bbdb org-w3m ox-gfm ox-md ox-latex
ox-icalendar ox-html ox-ascii ox-publish ox org-element avl-tree 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 cal-menu calendar cal-loaddefs helm-command
helm-elisp helm-eval edebug mwim avy misearch multi-isearch
company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-nxml company-bbdb yaml-mode helm-descbinds
fill-column-indicator magit-gitflow linum git-rebase magit-gh-pulls gh
gh-users gh-issues gh-pulls gh-repos gh-gist gh-oauth gh-api logito
gh-cache pcache eieio-base gh-auth gh-common gh-url gh-profile
evil-magit magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit magit-apply magit-wip magit-log
magit-diff smerge-mode magit-core magit-autorevert magit-process
magit-popup magit-mode magit-git crm magit-section magit-utils goto-addr
bug-reference auto-highlight-symbol clean-aindent-mode highlight-numbers
parent-mode highlight-parentheses hideshow rainbow-delimiters
clojure-snippets yasnippet sh-script executable helm-projectile
projectile grep ibuf-ext ibuffer recentf tree-widget shackle
hungry-delete fill-or-unfill fix-autorevert-breaking-git eval-overlay
fix-bracketed-paste company-simple-complete init-terminal-cursor
evil-terminal-cursor-changer init-org init-magit init-elixir init-deft
evil-mc evil-mc-command-execute evil-mc-command-record
evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo
evil-mc-vars evil-mc-known-commands evil-mc-common hl-todo xterm-color
spacemacs-whitespace-cleanup ws-butler winner window-numbering etags
xref project volatile-highlights vi-tilde-fringe tmux spaceline-config
spaceline-segments s spaceline powerline powerline-separators
powerline-themes smartparens-config smartparens-ruby smartparens-html
saveplace savehist ruby-test-mode pcre2el rxt re-builder ruby-mode smie
popwin persp-mode osx-trash info+ image-mode ido-vertical-mode helm-mode
helm-files image-dired dired-x dired-aux ffap helm-buffers helm-elscreen
helm-tags helm-bookmark helm-adaptive helm-info bookmark pp helm-locate
helm-grep helm-regexp helm-plugin helm-external helm-net browse-url xml
helm-utils helm-help helm-types git-gutter-fringe+ fringe-helper
git-gutter+ git-commit with-editor async-bytecomp async tramp-sh server
log-edit pcvs-util add-log docker-tramp tramp-cache tramp tramp-compat
tramp-loaddefs trampver shell pcomplete flyspell-correct-helm helm
helm-source helm-multi-match helm-lib flyspell-correct flyspell ispell
flycheck find-func flx-ido flx ido eyebrowse exec-path-from-shell
evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state
smartparens evil-indent-plus evil-exchange evil-escape evil-args
evil-anzu anzu cider-eval-sexp-fu eval-sexp-fu rx highlight diff-hl
vc-dir ewoc vc vc-dispatcher company-web dash company-css company
web-completion-data adaptive-wrap hybrid-mode evil-evilified-state
which-key use-package diminish bind-key hydra lv cus-edit cus-start
cus-load bind-map color evil evil-integration undo-tree diff evil-maps
evil-commands evil-jumps evil-command-window evil-types evil-search
evil-ex evil-macros evil-repeat evil-states evil-core evil-common
windmove thingatpt rect evil-digraphs evil-vars compile comint
ansi-color ring vc-git diff-mode autoload info mm-archive message dired
format-spec rfc822 mml mml-sec epg mailabbrev gmm-utils mailheader
url-handlers mail-utils network-stream nsm starttls url-http tls gnutls
url-gw url-cache url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap quelpa
url-parse auth-source gnus-util password-cache url-vars package-build
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr json map lisp-mnt hl-line
xt-mouse autorevert filenotify disp-table wid-edit monokai-theme
finder-inf init-html init-javascript sgml-mode init-evil
core-configuration-layer eieio-compat cl-seq ht cl warnings package
epg-config seq eieio byte-opt bytecomp byte-compile cl-extra help-mode
cconv eieio-core core-spacemacs core-use-package-ext
core-transient-state core-micro-state core-toggle core-keybindings
core-fonts-support core-spacemacs-buffer derived edmacro kmacro
core-funcs cl-macs gv core-themes-support core-display-init
core-auto-completion core-release-management core-dotspacemacs
core-command-line core-debug advice profiler easymenu cl-loaddefs cl-lib
page-break-lines easy-mmode subr-x pcase time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded 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 kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 1027204 982968)
 (symbols 48 76747 21)
 (miscs 40 10656 22806)
 (strings 32 208072 282751)
 (string-bytes 1 7135132)
 (vectors 16 113725)
 (vector-slots 8 2540642 333664)
 (floats 8 2447 14293)
 (intervals 56 12098 12677)
 (buffers 976 92))

-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 33571 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-09 14:56 bug#23928: 25.0.95; Performance regression observable with smartparens Aaron Jensen
@ 2016-07-09 15:53 ` Noam Postavsky
  2016-07-09 17:01   ` Eli Zaretskii
  2016-07-09 16:50 ` Eli Zaretskii
  1 sibling, 1 reply; 22+ messages in thread
From: Noam Postavsky @ 2016-07-09 15:53 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: 23928

To narrow things down, it would be helpful to have a profile from 24.5
(which I understand doesn't have this performance problem?) for
comparison.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-09 14:56 bug#23928: 25.0.95; Performance regression observable with smartparens Aaron Jensen
  2016-07-09 15:53 ` Noam Postavsky
@ 2016-07-09 16:50 ` Eli Zaretskii
  1 sibling, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-09 16:50 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: 23928

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sat, 09 Jul 2016 14:56:40 +0000
> 
> When compared to emacs 24.5, smartparens is now nearly unusable in emacs
> 25. I'm not familiar enough with emacs to track down the specific
> performance regression, but it appears to be regular expression or
> save-excursion related. This is the function that shows up hot on
> profiles:
> 
> https://github.com/Fuco1/smartparens/blob/1d858a9ec235cef5285503b6bb34be84cc3f5aa3/smartparens.el#L3621-L3646

All of the profiles in that issue point to smartparens' own functions
as the main sinks of CPU time, so I'm unsure why you think it's an
Emacs regression.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-09 15:53 ` Noam Postavsky
@ 2016-07-09 17:01   ` Eli Zaretskii
  2016-07-10  2:55     ` Aaron Jensen
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-09 17:01 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: aaronjensen, 23928

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Sat, 9 Jul 2016 11:53:00 -0400
> Cc: 23928@debbugs.gnu.org
> 
> To narrow things down, it would be helpful to have a profile from 24.5
> (which I understand doesn't have this performance problem?) for
> comparison.

I think the version of smartparens and some kind of recipe starting
from "emacs -Q" is also required, because saying it's unusable doesn't
really tell enough.

As I said, I'm not yet convinced it's an Emacs core problem.  I see no
evidence to that effect.

And please don't use elp.el to produce profiles, use profiler.el,
because the latter can profile primitives as well.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-09 17:01   ` Eli Zaretskii
@ 2016-07-10  2:55     ` Aaron Jensen
  2016-07-10 14:29       ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Aaron Jensen @ 2016-07-10  2:55 UTC (permalink / raw)
  To: Eli Zaretskii, Noam Postavsky; +Cc: 23928

[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

On Sat, Jul 9, 2016 at 10:01 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > To narrow things down, it would be helpful to have a profile from 24.5
> > (which I understand doesn't have this performance problem?) for
> > comparison.
>

I’ve added profiles of both here:
https://gist.github.com/aaronjensen/a1c2b56eac192b0d9cac76b493822070

In this profile, they’re showing pretty much the exact same performance, so
that doesn’t tell us much. I believe the performance degradation is
something that happens over time, and these are fresh runs of emacs. I’ll
have to try and get from 25 next time it slows down on me.

One curious thing is that the emacs 24 profile shows all of the builtins
(let/if/save-excusion) and the emacs 25 profile does not. Is there
something I’m doing wrong that is causing that? I’m using the same
`profiler-start` function.

>
> I think the version of smartparens and some kind of recipe starting
> from "emacs -Q" is also required, because saying it's unusable doesn't
> really tell enough.
>

I’ll work on this. It seems possible that it will be very hard to track
down given the nature—the performance isn’t *always* bad, it just becomes
bad at some point in the session. It’s possible that this is not an emacs
or even a smartparens bug, I mostly opened this in case something stood
out, “Oh, yea we changed the regex engine and…” or something like that.


>
> As I said, I'm not yet convinced it's an Emacs core problem.  I see no
> evidence to that effect.
>

> And please don't use elp.el to produce profiles, use profiler.el,
> because the latter can profile primitives as well.
>

I don’t even know how to use elp.el, was there some indication that I was?
As I said above, I’m confused by the fact that emacs 25 profiler output is
missing built in functions (Is this what you mean by primitives?)

Thanks!
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 3135 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10  2:55     ` Aaron Jensen
@ 2016-07-10 14:29       ` Eli Zaretskii
  2016-07-10 15:58         ` Aaron Jensen
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-10 14:29 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: npostavs, 23928

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sun, 10 Jul 2016 02:55:31 +0000
> Cc: 23928@debbugs.gnu.org
> 
> I’ve added profiles of both here:  https://gist.github.com/aaronjensen/a1c2b56eac192b0d9cac76b493822070
> 
> In this profile, they’re showing pretty much the exact same performance, so that doesn’t tell us much. I believe the performance degradation is something that happens over time, and these are fresh runs of emacs. I’ll have to try and get from 25 next time it slows down on me.

Thanks.

That rings a bell.  The hottest function on these profiles is
sp--looking-back, which calls in a loop sp--looking-at, which does
this:

  (defun sp--looking-at (regexp)
    "Like `looking-at', but always case sensitive."
    (let ((case-fold-search nil))
      (looking-at regexp)))

As you will see from bug#18522, binding case-fold-search can be very
expensive, especially if you have a lot of buffers.  See
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18522#201 for a summary
of the findings there.  It clearly shows in your profile:

                 sp--looking-at                171  12%
                  let                           12   0%

As to why you see a slowdown in Emacs 25, I don't know.  Maybe you
have more buffers crop up there as the session goes on?

> One curious thing is that the emacs 24 profile shows all of the builtins (let/if/save-excusion) and the emacs 25 profile does not. Is there something I’m doing wrong that is causing that?

Could it be that in Emacs 24 you loaded the library as a .el file, and
in Emacs 25 as a .elc file?

> I’ll work on this. It seems possible that it will be very hard to track down given the nature—the performance isn’t *always* bad, it just becomes bad at some point in the session.

When it becomes bad, count the number of buffers in each session.
Bug#18522 provides some tools for that.

>     And please don't use elp.el to produce profiles, use profiler.el,
>     because the latter can profile primitives as well.
> 
> I don’t even know how to use elp.el, was there some indication that I was?

Sorry, my bad.  It looked like elp.el output to me.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 14:29       ` Eli Zaretskii
@ 2016-07-10 15:58         ` Aaron Jensen
  2016-07-10 16:14           ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Aaron Jensen @ 2016-07-10 15:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, 23928

[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]

On Sun, Jul 10, 2016 at 7:30 AM Eli Zaretskii <eliz@gnu.org> wrote:

> Thanks.
>
> That rings a bell.  The hottest function on these profiles is
> sp--looking-back, which calls in a loop sp--looking-at, which does
> this:
>
>   (defun sp--looking-at (regexp)
>     "Like `looking-at', but always case sensitive."
>     (let ((case-fold-search nil))
>       (looking-at regexp)))
>
> As you will see from bug#18522, binding case-fold-search can be very
> expensive, especially if you have a lot of buffers.  See
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18522#201 for a summary
> of the findings there.  It clearly shows in your profile:
>
>                  sp--looking-at                171  12%
>                   let                           12   0%
>
> As to why you see a slowdown in Emacs 25, I don't know.  Maybe you
> have more buffers crop up there as the session goes on?
>

Interesting, yes this is possible. I switched to Emacs 25 before I started
emacs itself heavily and using window configurations heavily, so it is very
likely that I just end up with a large number of buffers and that’s when
the slowdown happens.

What is the alternative to binding case-fold-search? Could smartparens just
bind it once in a surrounding function? Or is there another way to ensure
that `looking-at` is case sensitive?


> > One curious thing is that the emacs 24 profile shows all of the builtins
> (let/if/save-excusion) and the emacs 25 profile does not. Is there
> something I’m doing wrong that is causing that?
>
> Could it be that in Emacs 24 you loaded the library as a .el file, and
> in Emacs 25 as a .elc file?
>

I suppose this is possible, I had just started emacs 24 and let it install
all from elpa/melpa (I’m using spacemacs, so it handled all this for me).
Typically it compiles everything, but maybe it hadn’t yet in the session I
was running. I have confirmed that if I eval-buffer smartparens.el, I get
the more detailed profile. That’s useful, thanks.


> > I’ll work on this. It seems possible that it will be very hard to track
> down given the nature—the performance isn’t *always* bad, it just becomes
> bad at some point in the session.
>
> When it becomes bad, count the number of buffers in each session.
> Bug#18522 provides some tools for that.
>

I couldn’t figure out how to count all_buffers, but I saw (length
(buffer-list)), is that sufficient?
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 3335 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 15:58         ` Aaron Jensen
@ 2016-07-10 16:14           ` Eli Zaretskii
  2016-07-10 16:53             ` Aaron Jensen
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-10 16:14 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: npostavs, 23928

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sun, 10 Jul 2016 15:58:58 +0000
> Cc: npostavs@users.sourceforge.net, 23928@debbugs.gnu.org
> 
> What is the alternative to binding case-fold-search? Could smartparens just bind it once in a surrounding
> function?

That's one way, yes.

> Or is there another way to ensure that `looking-at` is case sensitive?

Does smartparens really care about this?  Why?

>  When it becomes bad, count the number of buffers in each session.
>  Bug#18522 provides some tools for that.
> 
> I couldn’t figure out how to count all_buffers, but I saw (length (buffer-list)), is that sufficient?

That's a start, yes.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 16:14           ` Eli Zaretskii
@ 2016-07-10 16:53             ` Aaron Jensen
  2016-07-10 17:14               ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Aaron Jensen @ 2016-07-10 16:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, 23928

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

On Sun, Jul 10, 2016 at 9:15 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > Or is there another way to ensure that `looking-at` is case sensitive?
>
> Does smartparens really care about this?  Why?
>

I’d imagine because of things like ruby’s do/end. It wouldn’t want to match
DO/Do/etc.

By the way, I tested without the bind and smartparens doesn’t even show up
on the profile. Thank you very much for helping me track it down.

Would it be worth putting a warning in the docs of `let` for this case? Is
it only case-fold-search or are there other vars that require per buffer
updates to rebind?
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 994 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 16:53             ` Aaron Jensen
@ 2016-07-10 17:14               ` Eli Zaretskii
  2016-07-10 18:42                 ` Dmitry Gutov
  2016-07-10 18:49                 ` Aaron Jensen
  0 siblings, 2 replies; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-10 17:14 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: npostavs, 23928

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sun, 10 Jul 2016 16:53:45 +0000
> Cc: npostavs@users.sourceforge.net, 23928@debbugs.gnu.org
> 
>  Does smartparens really care about this? Why?
> 
> I’d imagine because of things like ruby’s do/end. It wouldn’t want to match DO/Do/etc.

Then setting case-fold-search locally in the buffer (with setq-local
and its ilk) should do the trick.

> By the way, I tested without the bind and smartparens doesn’t even show up on the profile.

Does this mean that the slow operation is also gone when you do that?

> Would it be worth putting a warning in the docs of `let` for this case?

Maybe in the manual.

> Is it only case-fold-search or are there other vars that require per
> buffer updates to rebind?

Any variable which is global by default, but can be local in some
buffers.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 17:14               ` Eli Zaretskii
@ 2016-07-10 18:42                 ` Dmitry Gutov
  2016-07-10 19:01                   ` Eli Zaretskii
  2016-07-10 18:49                 ` Aaron Jensen
  1 sibling, 1 reply; 22+ messages in thread
From: Dmitry Gutov @ 2016-07-10 18:42 UTC (permalink / raw)
  To: Eli Zaretskii, Aaron Jensen; +Cc: npostavs, 23928

On 07/10/2016 08:14 PM, Eli Zaretskii wrote:

>>  Does smartparens really care about this? Why?
>>
>> I’d imagine because of things like ruby’s do/end. It wouldn’t want to match DO/Do/etc.
>
> Then setting case-fold-search locally in the buffer (with setq-local
> and its ilk) should do the trick.

Do you mean something like

(let (was-local was-value)
   (unwind-protect
       (progn
         (when (local-variable-p 'case-fold-search)
           (setq was-local t
                 local-value case-fold-search))
         (setq-local case-fold-search nil)
         do-stuff)
     (if was-local
         (setq-local case-fold-search was-value)
       (kill-local-variable 'case-fold-search))))

?

(Minor modes are generally not expected to leave behind themselves 
changes buffer-local values of general-purpose variables).





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 17:14               ` Eli Zaretskii
  2016-07-10 18:42                 ` Dmitry Gutov
@ 2016-07-10 18:49                 ` Aaron Jensen
  1 sibling, 0 replies; 22+ messages in thread
From: Aaron Jensen @ 2016-07-10 18:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, 23928

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

On Sun, Jul 10, 2016 at 10:14 AM Eli Zaretskii <eliz@gnu.org> wrote:
 Does this mean that the slow operation is also gone when you do that?

It seems to be a little better, yes, though it’s hard to tell without
running a long session and opening several buffers. I just opened 200
buffers and it didn’t seem to be enough. I’ll have to wait and see until I
get to it naturally.

Any variable which is global by default, but can be local in some
> buffers.
>

Interesting. Good to know, thank you.
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 887 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 18:42                 ` Dmitry Gutov
@ 2016-07-10 19:01                   ` Eli Zaretskii
  2016-07-10 19:17                     ` Dmitry Gutov
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-10 19:01 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: npostavs, aaronjensen, 23928

> Cc: npostavs@users.sourceforge.net, 23928@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sun, 10 Jul 2016 21:42:50 +0300
> 
> > Then setting case-fold-search locally in the buffer (with setq-local
> > and its ilk) should do the trick.
> 
> Do you mean something like
> 
> (let (was-local was-value)
>    (unwind-protect
>        (progn
>          (when (local-variable-p 'case-fold-search)
>            (setq was-local t
>                  local-value case-fold-search))
>          (setq-local case-fold-search nil)
>          do-stuff)
>      (if was-local
>          (setq-local case-fold-search was-value)
>        (kill-local-variable 'case-fold-search))))
> 
> ?

Yes, something like that.  I admit I didn't study the code well enough
to figure out the details.

> (Minor modes are generally not expected to leave behind themselves 
> changes buffer-local values of general-purpose variables).

Of course.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 19:01                   ` Eli Zaretskii
@ 2016-07-10 19:17                     ` Dmitry Gutov
  2016-07-10 19:20                       ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Dmitry Gutov @ 2016-07-10 19:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, aaronjensen, 23928

On 07/10/2016 10:01 PM, Eli Zaretskii wrote:

> Yes, something like that.  I admit I didn't study the code well enough
> to figure out the details.

I have to say that the idea of using the above for changing the value of 
case-fold-search instead of let, is surprising for me. Most of the time, 
one is using let just for that effect.

The fact that it also changes the default values in all buffers is fine, 
for consistency and the principle of least surprise, but paying 
N(number-of-buffers) for that seems high.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 19:17                     ` Dmitry Gutov
@ 2016-07-10 19:20                       ` Eli Zaretskii
  2016-07-10 19:56                         ` Dmitry Gutov
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-10 19:20 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: npostavs, aaronjensen, 23928

> Cc: aaronjensen@gmail.com, npostavs@users.sourceforge.net,
>  23928@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sun, 10 Jul 2016 22:17:31 +0300
> 
> I have to say that the idea of using the above for changing the value of 
> case-fold-search instead of let, is surprising for me. Most of the time, 
> one is using let just for that effect.

It only causes trouble if done in the innermost loops of your
program.  Otherwise, the cost is almost negligible.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 19:20                       ` Eli Zaretskii
@ 2016-07-10 19:56                         ` Dmitry Gutov
  2016-07-11  2:28                           ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Dmitry Gutov @ 2016-07-10 19:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, aaronjensen, 23928

On 07/10/2016 10:20 PM, Eli Zaretskii wrote:

> It only causes trouble if done in the innermost loops of your
> program.  Otherwise, the cost is almost negligible.

I see. Then I think we should figure out why it's become more expensive 
in Emacs 25 (if that is indeed the case).





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-10 19:56                         ` Dmitry Gutov
@ 2016-07-11  2:28                           ` Eli Zaretskii
  2016-07-11  2:48                             ` Aaron Jensen
  0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-11  2:28 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: npostavs, aaronjensen, 23928

> Cc: npostavs@users.sourceforge.net, aaronjensen@gmail.com,
>  23928@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sun, 10 Jul 2016 22:56:03 +0300
> 
> On 07/10/2016 10:20 PM, Eli Zaretskii wrote:
> 
> > It only causes trouble if done in the innermost loops of your
> > program.  Otherwise, the cost is almost negligible.
> 
> I see. Then I think we should figure out why it's become more expensive 
> in Emacs 25 (if that is indeed the case).

It isn't yet clear that this is what happened.  Can someone time this
in both versions compiled with the same optimization options?





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-11  2:28                           ` Eli Zaretskii
@ 2016-07-11  2:48                             ` Aaron Jensen
  2016-07-11  2:49                               ` Aaron Jensen
  2016-07-11 14:38                               ` Eli Zaretskii
  0 siblings, 2 replies; 22+ messages in thread
From: Aaron Jensen @ 2016-07-11  2:48 UTC (permalink / raw)
  To: Eli Zaretskii, Dmitry Gutov; +Cc: npostavs, 23928

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On Sun, Jul 10, 2016 at 7:28 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > I see. Then I think we should figure out why it's become more expensive
> > in Emacs 25 (if that is indeed the case).
>
> It isn't yet clear that this is what happened.  Can someone time this
> in both versions compiled with the same optimization options?
>

I’m not thinking that this is the case anymore… at least, I don’t have any
evidence to point to that. I still don’t know exactly what state emacs has
to be in for it to be super painfully slow. The fix/workaround, while it
helped, only really shaved off 4ms or so from a typometer avg, which is
significant, but it wasn’t as bad as I had seen it in the slow case, so I’m
probably missing something in the repro.

Any way, I’m happy to consider this bug closed if you all are, though I
think that adding additional caveats to the docs would be wonderful, this
is a particularly nasty/surprising thing.

Thank you all for your help.
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 1412 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-11  2:48                             ` Aaron Jensen
@ 2016-07-11  2:49                               ` Aaron Jensen
  2016-07-11 14:38                               ` Eli Zaretskii
  1 sibling, 0 replies; 22+ messages in thread
From: Aaron Jensen @ 2016-07-11  2:49 UTC (permalink / raw)
  To: Eli Zaretskii, Dmitry Gutov; +Cc: npostavs, 23928

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

By the way, here’s the pull request I ended up submitting back to
smartparens: https://github.com/Fuco1/smartparens/pull/628
<https://github.com/Fuco1/smartparens/pull/628>

Feel free to comment on it if you have feedback. Thanks again!
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 458 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-11  2:48                             ` Aaron Jensen
  2016-07-11  2:49                               ` Aaron Jensen
@ 2016-07-11 14:38                               ` Eli Zaretskii
  2016-07-20  4:58                                 ` Aaron Jensen
  1 sibling, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-11 14:38 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: npostavs, dgutov, 23928

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Mon, 11 Jul 2016 02:48:16 +0000
> Cc: npostavs@users.sourceforge.net, 23928@debbugs.gnu.org
> 
> Any way, I’m happy to consider this bug closed if you all are, though I think that adding additional caveats to
> the docs would be wonderful, this is a particularly nasty/surprising thing.

Let's wait for a few days, in case you find more interesting data.

Thanks.





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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-11 14:38                               ` Eli Zaretskii
@ 2016-07-20  4:58                                 ` Aaron Jensen
  2016-07-20 14:56                                   ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Aaron Jensen @ 2016-07-20  4:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: npostavs, dgutov, 23928

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

On Mon, Jul 11, 2016 at 7:39 AM Eli Zaretskii <eliz@gnu.org> wrote:

> Let's wait for a few days, in case you find more interesting data.
>

With the two patches[1][2] I’ve applied to smartparens, smartparens no
longer has any measurable performance issues on my machine in my testing,
so if there was a regression I’m not going to be able to find it in this
way. I think the most likely story is that I never stuck w/ emacs 24 long
enough w/ my current config to run into the performance issue.

Thank you again for all your assistance.

[1]: https://github.com/Fuco1/smartparens/pull/629
[2]: https://github.com/Fuco1/smartparens/pull/628
<https://github.com/Fuco1/smartparens/pull/628>
<https://github.com/Fuco1/smartparens/pull/629>
-- 
Aaron

[-- Attachment #2: Type: text/html, Size: 1321 bytes --]

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

* bug#23928: 25.0.95; Performance regression observable with smartparens
  2016-07-20  4:58                                 ` Aaron Jensen
@ 2016-07-20 14:56                                   ` Eli Zaretskii
  0 siblings, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2016-07-20 14:56 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: 23928-done, dgutov, npostavs

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Wed, 20 Jul 2016 04:58:15 +0000
> Cc: dgutov@yandex.ru, npostavs@users.sourceforge.net, 23928@debbugs.gnu.org
> 
> On Mon, Jul 11, 2016 at 7:39 AM Eli Zaretskii <eliz@gnu.org> wrote:
> 
>  Let's wait for a few days, in case you find more interesting data.
> 
> With the two patches[1][2] I’ve applied to smartparens, smartparens no longer has any measurable
> performance issues on my machine in my testing, so if there was a regression I’m not going to be able to find
> it in this way. I think the most likely story is that I never stuck w/ emacs 24 long enough w/ my current config to
> run into the performance issue.

Thanks, so I'm closing the bug.





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

end of thread, other threads:[~2016-07-20 14:56 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-09 14:56 bug#23928: 25.0.95; Performance regression observable with smartparens Aaron Jensen
2016-07-09 15:53 ` Noam Postavsky
2016-07-09 17:01   ` Eli Zaretskii
2016-07-10  2:55     ` Aaron Jensen
2016-07-10 14:29       ` Eli Zaretskii
2016-07-10 15:58         ` Aaron Jensen
2016-07-10 16:14           ` Eli Zaretskii
2016-07-10 16:53             ` Aaron Jensen
2016-07-10 17:14               ` Eli Zaretskii
2016-07-10 18:42                 ` Dmitry Gutov
2016-07-10 19:01                   ` Eli Zaretskii
2016-07-10 19:17                     ` Dmitry Gutov
2016-07-10 19:20                       ` Eli Zaretskii
2016-07-10 19:56                         ` Dmitry Gutov
2016-07-11  2:28                           ` Eli Zaretskii
2016-07-11  2:48                             ` Aaron Jensen
2016-07-11  2:49                               ` Aaron Jensen
2016-07-11 14:38                               ` Eli Zaretskii
2016-07-20  4:58                                 ` Aaron Jensen
2016-07-20 14:56                                   ` Eli Zaretskii
2016-07-10 18:49                 ` Aaron Jensen
2016-07-09 16:50 ` 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).