From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Hecker Newsgroups: gmane.emacs.bugs Subject: bug#33670: 26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64 Date: Fri, 7 Dec 2018 18:42:23 -0800 Message-ID: <647599b2-0aae-8654-a662-a8142dd360d2@d6.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1544236870 17514 195.159.176.226 (8 Dec 2018 02:41:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2018 02:41:10 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: 33670@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 08 03:41:06 2018 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 1gVSYD-0004QK-Sg for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2018 03:41:06 +0100 Original-Received: from localhost ([::1]:48857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVSaK-0003Jk-21 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Dec 2018 21:43:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVSaC-0003BP-Pm for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:43:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVSa7-0007tu-5B for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:43:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVSa6-0007ti-U3 for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gVSa6-0001Pb-Of for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Hecker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2018 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33670 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.15442369495380 (code B ref -1); Sat, 08 Dec 2018 02:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Dec 2018 02:42:29 +0000 Original-Received: from localhost ([127.0.0.1]:37455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gVSZZ-0001Oh-Cr for submit@debbugs.gnu.org; Fri, 07 Dec 2018 21:42:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gVSZY-0001OS-4L for submit@debbugs.gnu.org; Fri, 07 Dec 2018 21:42:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVSZQ-0007jl-JV for submit@debbugs.gnu.org; Fri, 07 Dec 2018 21:42:22 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40753) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gVSZQ-0007je-Er for submit@debbugs.gnu.org; Fri, 07 Dec 2018 21:42:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVSZP-00038c-4G for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:42:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVSZL-0007il-1o for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:42:19 -0500 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:36714) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVSZK-0007iL-Oj for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2018 21:42:14 -0500 Original-Received: by mail-pg1-x534.google.com with SMTP id n2so2507263pgm.3 for ; Fri, 07 Dec 2018 18:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=d6-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:openpgp:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=5kdTr1ivkylGNDqI0nRwqsnz0fRdbfJVb/DlODWtC1Q=; b=oI9Xszzru3VkmOUFo4fIFM76AZP1teUenPALB/JWd385mC48VfWnP3Fuk9jze1IVUU ULZZrr5BYmy6+85Snpl/EzGWXtXhRr3V5Svmm89j+shHViu2WeCgYf6Sjb5+KnTlirGA DnGV7/LWju494D0+MhiQQ/ekmYMyE6hNzg2l7KmTT0msQehfCJTC3htXiSH69uMAPCLx nWn2VWebWuWMDPCxNgWvD8sF8i3QhBYChau4or+T78v0+SHiQ6p6z81QvYQzwpes8rdc ZG2ZDIpiBbEM6v5nxE+l6JDS404iIaEwmvxsCVAuZoSbd+Ffz0paBqQUyfaQd77/j4CZ HqXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:openpgp:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=5kdTr1ivkylGNDqI0nRwqsnz0fRdbfJVb/DlODWtC1Q=; b=dPVKwdpG3+72xJtmjCnXFQ7ZMNJILRCBcMb4a7qUU1w3A3GVfT74Ew/Fp9cFNTSbW7 0ZEyw/TjAj5ULZdD2/yAdkK1u3xL5RSHZarR5uq56YxNZ+yYXT+C9M2mn/7YR3aeXx5Y YlS0roxNXLJy7wmpfBG6Te/b/F4m1Es+PTGwvXpmwzwUd824cJvPHRXIpPSue1+kP6rL rzCJvthP4kM/22Ub8P+tGePiqDdQ7NVeddoyLXXKir51Z1wzVA05RoHdmi8ivL+LBuSv tDusERDPwenJRFq3OM1BC94VlbbQ9Z83bFPXDNGNnoJg36Il2mMwvAm5pWLmVU4pc4ay 87yA== X-Gm-Message-State: AA+aEWapsasyeTJ/kAAqIk6z4AfJOSFAOc5sd/OwzeFfHXkhFW38ON9G IcfyT8nTEgGmLlD95Me2UcElVSsdwgE= X-Google-Smtp-Source: AFSGD/W6aKY5OxL3l+7moes0CxS7EbTvsEvsRxK+aMku6xqQiWAJ89rLm/a5jPAOHOxlNNfP1Mw2gw== X-Received: by 2002:a62:de06:: with SMTP id h6mr4709868pfg.158.1544236932431; Fri, 07 Dec 2018 18:42:12 -0800 (PST) Original-Received: from [192.168.1.53] (c-67-180-254-69.hsd1.ca.comcast.net. [67.180.254.69]) by smtp.gmail.com with ESMTPSA id c7sm7499285pfh.18.2018.12.07.18.42.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 18:42:11 -0800 (PST) Openpgp: preference=signencrypt Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:153200 Archived-At: Hi, I recently upgraded from 25.3_1 to to 26.1 on Windows 7 x64 and I've noticed a very large performance regression on yanks in C++ mode buffers (it feels slower in many other operations as well, but I actually measured yank with the profiler). This happens even starting with with emacs -Q. If I start emacs and visit a moderately large cpp file (18k LOC), and go to the same place in the middle of the file in both versions of emacs, then kill and yank the current line, the performance on 26.1 is easily 10x worse...the yank is instant in 25.3_1 and takes literally almost a second on 26.1 sometimes. I decided to test this with a profiler run, so I went to the same line in both, killed the line, and evaled this: (progn (profiler-start 'cpu) (yank) (profiler-report) (profiler-stop)) Here are the results: 25.3_1: - ... 1 100% Automatic GC 1 100% 26.1: - command-execute 14 100% - call-interactively 14 100% - funcall-interactively 14 100% - eval-expression 14 100% - eval 14 100% - progn 14 100% - yank 14 100% - insert-for-yank 14 100% - insert-for-yank-1 14 100% - c-after-change 13 92% - mapc 13 92% - # 13 92% - c-after-change-re-mark-raw-strings 6 42% - c-in-literal 3 21% - c-state-semi-pp-to-literal 3 21% c-parse-ps-state-below 3 21% - c-restore-<>-properties 4 28% c-syntactic-re-search-forward 4 28% c-neutralize-syntax-in-CPP 3 21% - remove-yank-excluded-properties 1 7% - remove-list-of-text-properties 1 7% - c-after-change 1 7% - c-before-change 1 7% - mapc 1 7% - # 1 7% c-depropertize-CPP 1 7% - ... 0 0% Automatic GC 0 0% I'm going to try the older cc-mode with the newer emacs and see if that fixes it, but I figured I'd report this bug now in case you haven't gotten other reports yet. Thanks, Chris In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 built on CIRROCUMULUS Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. spyparty_ui.cpp has auto save data; consider M-x recover-this-file Mark saved where search started Mark set Quit CPU profiler started Mark set CPU profiler stopped "CPU profiler stopped" C-; is undefined Quit [3 times] Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Profiler-Report Minor modes in effect: 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 buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils profiler misearch multi-isearch vc-dispatcher vc-bzr cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win 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 charprop 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 w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 126347 12125) (symbols 56 22860 1) (miscs 48 74 192) (strings 32 37966 2210) (string-bytes 1 1104314) (vectors 16 37221) (vector-slots 8 997518 11240) (floats 8 65 156) (intervals 56 1881 214) (buffers 992 15))