From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sho Takemori Newsgroups: gmane.emacs.bugs Subject: bug#26079: 26.0.50; Performance regression in delete-trailing-whitespace Date: Mon, 13 Mar 2017 11:13:28 +0900 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140f666df42fe054a9341a2 X-Trace: blaine.gmane.org 1489371254 21309 195.159.176.226 (13 Mar 2017 02:14:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Mar 2017 02:14:14 +0000 (UTC) To: 26079@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 13 03:14:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnFUr-0004YE-A8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Mar 2017 03:14:05 +0100 Original-Received: from localhost ([::1]:49748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnFUx-0006zK-FX for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 22:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnFUq-0006zD-Hv for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnFUo-0004KB-L0 for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:14:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54869) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnFUo-0004K4-Ht for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnFUo-0006UM-CQ for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sho Takemori Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Mar 2017 02:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26079 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.148937122724910 (code B ref -1); Mon, 13 Mar 2017 02:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Mar 2017 02:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:53068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnFUY-0006Ti-Fk for submit@debbugs.gnu.org; Sun, 12 Mar 2017 22:13:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnFUW-0006TV-Mc for submit@debbugs.gnu.org; Sun, 12 Mar 2017 22:13:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnFUP-000479-FT for submit@debbugs.gnu.org; Sun, 12 Mar 2017 22:13:39 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50166) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnFUP-00046j-BH for submit@debbugs.gnu.org; Sun, 12 Mar 2017 22:13:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnFUM-0006us-2z for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:13:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnFUK-000416-5Q for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:13:34 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:35230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnFUJ-0003y6-Vb for bug-gnu-emacs@gnu.org; Sun, 12 Mar 2017 22:13:32 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id 62so72264546oih.2 for ; Sun, 12 Mar 2017 19:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fhpYhGIDs0jeGp4fHFXL4SUFM5TCt+Oeg/5tedCPSOc=; b=G6bH5FRz2dahjutNQ72SkasIWMKBp7gYM4fAb/BTxayPwoFrHzuw07eTF7fdLy1Huo BHqOCldWy/mo6mxjRX8C8TUDqVu3dKBUcAqZSPzkiGBC3ZCxXJ1dgD/9+zg3Q7y1xooi +Pv4zxcTV+fabqVrLq0bKuZKJqXUyCqRNjINceurjR8v1zaiVPkKtpSOaVV/HSIYCvQo vMy9M+52V5+9icKODik9vfPGfuqwVOeZBWgTU+wm31TWousTbSxABmXJXzODGnjrGb8O tiZ7ET8kcYuSKO1HVmIBhQnTOvsPJBownhKplhsst1EyHVqD9p3aLSTbp2rg4/WpsZtl rEEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fhpYhGIDs0jeGp4fHFXL4SUFM5TCt+Oeg/5tedCPSOc=; b=J4TYCaJuZAeyV7lYmfefBZJi8I+8aJ0c6ASbKjHteA7OfLH7mvQ02GkaQ8i4rrqdjJ itfpiV8WQ0r0/HSV2yQlOzuVBvESdY12wJPAr2wPrkYgA5uFXoyKUNhwK7F9wat3fRkZ kepm9PIqyQR9puo7StR5l1qpZ2/OxpbvGWIbb7PI8KN9WYQQrOq8CbOFNE7LAnHHPSt8 CyZ6jYOKCUmsl1n+BkO0kuAMFRP4Gfa8Cza6x3UURiyci0daJqMeuXKJb5pWg4t5qgOh VO8iQIcPDJxFavXdLXyQ16+YmENdtCaWfypmSGyqfgb9jcTnKgFxfdRTzR1NVsBLqQkI RArQ== X-Gm-Message-State: AMke39kOyH5v0H7gvwN8aVwd572Ci/Zf2WxVL0fiLLFTE26Khr1qSgKVFfjlHBcEHpdefmsnXYFo51sGj4lVZQ== X-Received: by 10.202.96.134 with SMTP id u128mr14704885oib.172.1489371209350; Sun, 12 Mar 2017 19:13:29 -0700 (PDT) Original-Received: by 10.202.56.135 with HTTP; Sun, 12 Mar 2017 19:13:28 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130529 Archived-At: --001a1140f666df42fe054a9341a2 Content-Type: text/plain; charset=UTF-8 Dear developers, delete-trailing-whitespace in Emacs 26 for large files is very slow. For example, it took about 1.6s for this file ( https://raw.githubusercontent.com/stakemori/e8theta_degree3/master/results/wt18_17_5/wt18_17_5.org ). But in Emacs 25, it took about 0.003s. A similar code to the following is used in delete-trailing-whitespace. And it is slow for large files. (save-excursion (let ((end-marker nil)) (goto-char (point-min)) (with-syntax-table (make-syntax-table (syntax-table)) (modify-syntax-entry ?\f "_") (modify-syntax-entry ?\n "_") (re-search-forward "\\s-+$" end-marker t)))) Best regards, Sho Takemori In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-03-13 built on 500-270jp Repository revision: cf670b49a7704d63575863f832426d32bf6a8c3c Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.2 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. delete-backward-char: Text is read-only (1.6173726940000002 0 0.0) Quit Configured using: 'configure --with-sound=no --with-modules' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LC_MONETARY: ja_JP.UTF-8 value of $LC_NUMERIC: ja_JP.UTF-8 value of $LC_TIME: ja_JP.UTF-8 value of $LANG: ja_JP.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message puny rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail benchmark vc-git diff-mode org-element org-rmail org-mhe org-irc org-info org-gnus gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils org-docview doc-view jka-compr image-mode dired dired-loaddefs org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline easy-mmode 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 seq cal-menu calendar cal-loaddefs tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color ring parse-time format-spec advice auth-source cl-seq eieio byte-opt subr-x bytecomp byte-compile cl-extra help-mode easymenu cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib password-cache time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 275028 6205) (symbols 48 28629 1) (miscs 40 79 128) (strings 32 45484 10223) (string-bytes 1 1457234) (vectors 16 45224) (vector-slots 8 888199 4865) (floats 8 105 76) (intervals 56 394 5) (buffers 976 12) (heap 1024 30354 1435)) --001a1140f666df42fe054a9341a2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear developers,

delete-trai= ling-whitespace in Emacs 26 for large files is very slow.

But in Emacs 25, it= took about 0.003s.
A similar code to the following is used in de= lete-trailing-whitespace. And it is slow for large files.

(save-excursion
=C2=A0 =C2=A0 (let ((end-marker nil)= )
=C2=A0 =C2=A0 =C2=A0 (goto-char (point-min))
=C2=A0 = =C2=A0 =C2=A0 (with-syntax-table (make-syntax-table (syntax-table))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (modify-syntax-entry ?\f "_")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (modify-syntax-entry ?\n "_")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (re-search-forward "\\s-+$" = end-marker t))))

Best regards,
Sho= Takemori

In GNU Emacs 26.0.50 (build 1, x86_64-pc= -linux-gnu, GTK+ Version 3.18.9)
=C2=A0of 2017-03-13 built on 500= -270jp
Repository revision: cf670b49a7704d63575863f832426d32bf6a8= c3c
Windowing system distributor 'The X.Org Foundation', = version 11.0.11804000
System Description: Ubuntu 16.04.2 LTS

Recent messages:
For information about GNU Emacs = and the GNU system, type C-h C-a.
delete-backward-char: Text is r= ead-only
(1.6173726940000002 0 0.0)
Quit
Conf= igured using:
=C2=A0'configure --with-sound=3Dno --with-modul= es'

Configured features:
XPM JPEG TI= FF GIF PNG RSVG IMAGEMAGICK GPM DBUS GCONF GSETTINGS NOTIFY
ACL L= IBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKI= T_SCROLL_BARS GTK3 X11 MODULES

Important settings:=
=C2=A0 value of $LC_MONETARY: ja_JP.UTF-8
=C2=A0 value= of $LC_NUMERIC: ja_JP.UTF-8
=C2=A0 value of $LC_TIME: ja_JP.UTF-= 8
=C2=A0 value of $LANG: ja_JP.UTF-8
=C2=A0 value of $X= MODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Org

Minor modes = in effect:
=C2=A0 diff-auto-refine-mode: t
=C2=A0 shell= -dirtrack-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-= eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mou= se-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-ba= r-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global= -font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blin= k-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0= auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t
<= div>
Load-path shadows:
None found.

<= /div>
Features:
(shadow sort mail-extr emacsbug message puny = rfc822 mml mml-sec epa
derived epg epg-config mm-decode mm-bodies= mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sen= dmail benchmark vc-git diff-mode
org-element org-rmail org-mhe or= g-irc org-info org-gnus gnus-util rmail
rmail-loaddefs rfc2047 rf= c2045 ietf-drums mm-util mail-prsvr mail-utils
org-docview doc-vi= ew jka-compr image-mode dired dired-loaddefs
org-bibtex bibtex or= g-bbdb org-w3m org org-macro org-footnote
org-pcomplete org-list = org-faces org-entities noutline outline
easy-mmode 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 seq cal-menu calendar cal-loaddefs tramp
tramp-compat t= ramp-loaddefs trampver ucs-normalize shell pcomplete
comint ansi-= color ring parse-time format-spec advice auth-source cl-seq
eieio= byte-opt subr-x bytecomp byte-compile cl-extra help-mode easymenu
cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib
=
password-cache time-date mule-util japan-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-w= in
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fr= inge
tabulated-list replace newcomment text-mode elisp-mode lisp-= mode
prog-mode register page menu-bar rfn-eshadow isearch timer s= elect
scroll-bar mouse jit-lock font-lock syntax facemenu font-co= re
term/tty-colors 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 i= ndian cyrillic
chinese composite charscript case-table epa-hook j= ka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded n= advice loaddefs button
faces cus-face macroexp files text-propert= ies overlay sha1 md5 base64
format env code-pages mule custom wid= get hashtable-print-readable
backquote dbusbind inotify dynamic-s= etting system-font-setting
font-render-setting move-toolbar gtk x= -toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 275028 6205)
= =C2=A0(symbols 48 28629 1)
=C2=A0(miscs 40 79 128)
=C2= =A0(strings 32 45484 10223)
=C2=A0(string-bytes 1 1457234)
<= div>=C2=A0(vectors 16 45224)
=C2=A0(vector-slots 8 888199 4865)
=C2=A0(floats 8 105 76)
=C2=A0(intervals 56 394 5)
=
=C2=A0(buffers 976 12)
=C2=A0(heap 1024 30354 1435))

--001a1140f666df42fe054a9341a2--