GNU bug report logs - #33670
26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Chris Hecker <checker@HIDDEN>; dated Sat, 8 Dec 2018 02:43:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 9 Dec 2018 18:31:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 13:31:42 2018
Received: from localhost ([127.0.0.1]:40229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gW3rh-0007Fz-VN
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 13:31:42 -0500
Received: from colin.muc.de ([193.149.48.1]:45787 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1gW3rg-0007Fp-7B
 for 33670 <at> debbugs.gnu.org; Sun, 09 Dec 2018 13:31:40 -0500
Received: (qmail 10723 invoked by uid 3782); 9 Dec 2018 18:31:39 -0000
Received: from acm.muc.de (p2E5D55DE.dip0.t-ipconnect.de [46.93.85.222]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 09 Dec 2018 19:31:37 +0100
Received: (qmail 4790 invoked by uid 1000); 9 Dec 2018 18:26:32 -0000
Date: Sun, 9 Dec 2018 18:26:32 +0000
To: Chris Hecker <checker@HIDDEN>
Subject: Re: bug#33670: 26.1; very large c++-mode yank performance regression
 25.3_1-x86_64 -> 26.1-x86_64
Message-ID: <20181209182632.GB4159@ACM>
References: <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN>
 <20181208204036.61878.qmail@HIDDEN>
 <CAOdMLc1da--htqCC2+k4qfQDkbOB=SFhp=_nPeyeaTi67gMCug@HIDDEN>
 <20181209120102.GB4878@ACM>
 <CAOdMLc2urrn-owUAAfZ-94jTCy1pa124fJK-1W1XeG55KLrDrQ@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAOdMLc2urrn-owUAAfZ-94jTCy1pa124fJK-1W1XeG55KLrDrQ@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Chris.

On Sun, Dec 09, 2018 at 09:57:10 -0800, Chris Hecker wrote:
> I think I can send it [the file demonstrating the bug] to you
> privately, I’ll mail you off the bug list later today.

That would be great.  If you want it kept private, that won't be a
problem.  Thanks!

> Chris

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 9 Dec 2018 17:57:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 12:57:31 2018
Received: from localhost ([127.0.0.1]:40216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gW3Kc-0006JV-Q2
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 12:57:31 -0500
Received: from mail-ed1-f51.google.com ([209.85.208.51]:44838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <checker@HIDDEN>) id 1gW3KZ-0006JF-Gr
 for 33670 <at> debbugs.gnu.org; Sun, 09 Dec 2018 12:57:28 -0500
Received: by mail-ed1-f51.google.com with SMTP id y56so7588525edd.11
 for <33670 <at> debbugs.gnu.org>; Sun, 09 Dec 2018 09:57:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=d6-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=pnx0orInPiIV1K5vpVhjgIo3dc6ejDTyhxXhsAqUZwY=;
 b=c1zCgwLOgd6gFWu0y8u+0bvFS3GK4fSYtaASbwGJFJs44Y8403rJ19iCeKUVHkfLsj
 /HfjvUhMgjaLMJAs6EGA3g5UsBR0ADsOVDov/JpZzR+tbQCLdn6hwjAIwfDFZPlfdzLs
 MZ6J2R0WnWbEMUN4nun08wOpOF4ZdI+RXDHZuu5ljK+LTakC2Zj5O3RRiV/WeQdy7AVC
 b83LhjsyhAFKbFqgGUQaYRXmUFCaVOIcl97P9hr9r1W3fLCZLkx36fTZdti2Fuf2vDHO
 u1AkrDHOzVU+tMHZemq5JHFO4fjn8z3jp5WxmnWjrFZx8QmOrFe54zyogYY8aeumOy1G
 a9vA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=pnx0orInPiIV1K5vpVhjgIo3dc6ejDTyhxXhsAqUZwY=;
 b=VsWbAZipW62mIoijAaRZuW3Mq4hlHXlXXfiXPAf67YD/J/fZIPmcUR/KMzl1gKTE20
 +uTlWwfGT3oMxaSOGskrToHAG1OcG428TjfTly4EPPxUpUZhK4C6Z42pXdWJdM/vNua+
 3OEQv7X20Om2+U7uBMebcmoKzon3LGLAeaF5yIwCUlSE3ewr0Xb0adnDnXqlp6SLuOXj
 jHmUMw6zqPshNE0aVIAje7oFIS+uSVOSCm8rr1VyIbvJPTkZRbsWJZn4proYez95Lcqh
 F+79J5FfpkWvZFT4jU3DQItwF/GbO40eUqHzWI1ZquxYrY3cOuAUQ9lMCW0vYU7pGxhI
 1DjQ==
X-Gm-Message-State: AA+aEWbBWqr/cXn9JA4cFYcIUZNPBuNcx1N+ENWCw3SbWZeWpRWdjYrC
 ILS2ngCHX4rKic16+u1e2QRBfGoLPkUXZrMavGl2xw==
X-Google-Smtp-Source: AFSGD/W6ZTSsaTH8gkOALqT9zF2KWY/CxXrUw/PA4qJ7/7Bdcoebp6j6Aj809Vki+0TO3F0hcU2GPbFQJABBgAqfVC8=
X-Received: by 2002:a17:906:38e:: with SMTP id
 b14-v6mr6974047eja.209.1544378241574; 
 Sun, 09 Dec 2018 09:57:21 -0800 (PST)
MIME-Version: 1.0
References: <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN>
 <20181208204036.61878.qmail@HIDDEN>
 <CAOdMLc1da--htqCC2+k4qfQDkbOB=SFhp=_nPeyeaTi67gMCug@HIDDEN>
 <20181209120102.GB4878@ACM>
In-Reply-To: <20181209120102.GB4878@ACM>
From: Chris Hecker <checker@HIDDEN>
Date: Sun, 9 Dec 2018 09:57:10 -0800
Message-ID: <CAOdMLc2urrn-owUAAfZ-94jTCy1pa124fJK-1W1XeG55KLrDrQ@HIDDEN>
Subject: Re: bug#33670: 26.1; very large c++-mode yank performance regression
 25.3_1-x86_64 -> 26.1-x86_64
To: Alan Mackenzie <acm@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000007d03ac057c9a94a3"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000007d03ac057c9a94a3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I think I can send it to you privately, I=E2=80=99ll mail you off the bug l=
ist
later today.

Chris


On Sun, Dec 9, 2018 at 04:06 Alan Mackenzie <acm@HIDDEN> wrote:

> Hello, Chris.
>
> On Sat, Dec 08, 2018 at 13:31:42 -0800, Chris Hecker wrote:
> > It wasn=E2=80=99t a string, it was a single line function call.  Very s=
imple
> code.
>
> > Like:
>
> >    Foo();
>
> Ah.  That's worrying.  The cause of the slowdown will not be found in
> that single line of code, rather in its context.
>
> The way CC Mode works is, at each buffer change, a region around the
> change where side effects might propagate is calculated.  This region is
> then checked for any such side effects.  I'm guessing here, but it might
> well be that the region in this case has been extended far more than is
> necessary.
>
> Is there any way you could get a copy of the file to me, specifying a
> line which shows the problem?  It's practically impossible to debug
> otherwise.
>
> Thanks!
>
> > Chris
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>

--0000000000007d03ac057c9a94a3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div><div dir=3D"auto">I think I can send it to you privately, I=E2=80=99ll=
 mail you off the bug list later today.</div></div><div dir=3D"auto"><br></=
div><div dir=3D"auto">Chris</div><div dir=3D"auto"><br></div><div><br><div =
class=3D"gmail_quote"><div dir=3D"ltr">On Sun, Dec 9, 2018 at 04:06 Alan Ma=
ckenzie &lt;<a href=3D"mailto:acm@HIDDEN">acm@HIDDEN</a>&gt; wrote:<br></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex">Hello, Chris.<br>
<br>
On Sat, Dec 08, 2018 at 13:31:42 -0800, Chris Hecker wrote:<br>
&gt; It wasn=E2=80=99t a string, it was a single line function call.=C2=A0 =
Very simple code.<br>
<br>
&gt; Like:<br>
<br>
&gt;=C2=A0 =C2=A0 Foo();<br>
<br>
Ah.=C2=A0 That&#39;s worrying.=C2=A0 The cause of the slowdown will not be =
found in<br>
that single line of code, rather in its context.<br>
<br>
The way CC Mode works is, at each buffer change, a region around the<br>
change where side effects might propagate is calculated.=C2=A0 This region =
is<br>
then checked for any such side effects.=C2=A0 I&#39;m guessing here, but it=
 might<br>
well be that the region in this case has been extended far more than is<br>
necessary.<br>
<br>
Is there any way you could get a copy of the file to me, specifying a<br>
line which shows the problem?=C2=A0 It&#39;s practically impossible to debu=
g<br>
otherwise.<br>
<br>
Thanks! <br>
<br>
&gt; Chris<br>
<br>
-- <br>
Alan Mackenzie (Nuremberg, Germany).<br>
</blockquote></div></div>

--0000000000007d03ac057c9a94a3--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 9 Dec 2018 12:06:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 07:06:12 2018
Received: from localhost ([127.0.0.1]:39265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVxqd-0002rO-Pd
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 07:06:12 -0500
Received: from colin.muc.de ([193.149.48.1]:55444 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1gVxqc-0002rG-C6
 for 33670 <at> debbugs.gnu.org; Sun, 09 Dec 2018 07:06:10 -0500
Received: (qmail 77617 invoked by uid 3782); 9 Dec 2018 12:06:09 -0000
Received: from acm.muc.de (p2E5D55DE.dip0.t-ipconnect.de [46.93.85.222]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 09 Dec 2018 13:06:08 +0100
Received: (qmail 5293 invoked by uid 1000); 9 Dec 2018 12:01:02 -0000
Date: Sun, 9 Dec 2018 12:01:02 +0000
To: Chris Hecker <checker@HIDDEN>
Subject: Re: bug#33670: 26.1; very large c++-mode yank performance regression
 25.3_1-x86_64 -> 26.1-x86_64
Message-ID: <20181209120102.GB4878@ACM>
References: <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN>
 <20181208204036.61878.qmail@HIDDEN>
 <CAOdMLc1da--htqCC2+k4qfQDkbOB=SFhp=_nPeyeaTi67gMCug@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAOdMLc1da--htqCC2+k4qfQDkbOB=SFhp=_nPeyeaTi67gMCug@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Chris.

On Sat, Dec 08, 2018 at 13:31:42 -0800, Chris Hecker wrote:
> It wasn’t a string, it was a single line function call.  Very simple code.

> Like:

>    Foo();

Ah.  That's worrying.  The cause of the slowdown will not be found in
that single line of code, rather in its context.

The way CC Mode works is, at each buffer change, a region around the
change where side effects might propagate is calculated.  This region is
then checked for any such side effects.  I'm guessing here, but it might
well be that the region in this case has been extended far more than is
necessary.

Is there any way you could get a copy of the file to me, specifying a
line which shows the problem?  It's practically impossible to debug
otherwise.

Thanks! 

> Chris

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 8 Dec 2018 21:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 16:32:03 2018
Received: from localhost ([127.0.0.1]:38827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVkCg-0005XO-VV
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 16:32:03 -0500
Received: from mail-ed1-f46.google.com ([209.85.208.46]:40247)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <checker@HIDDEN>) id 1gVkCe-0005Wu-32
 for 33670 <at> debbugs.gnu.org; Sat, 08 Dec 2018 16:32:01 -0500
Received: by mail-ed1-f46.google.com with SMTP id d3so6459532edx.7
 for <33670 <at> debbugs.gnu.org>; Sat, 08 Dec 2018 13:32:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=d6-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=VAdjYAnJCaRdOh9WLdYqu394XALlieQPTYEnG04wNb0=;
 b=Ycf+/FMTID1PMtrmi1MxkT01Yi8wOP4u8LKEKFEy56MewtovuJsSAm1Xeyi39gTP4Z
 EOMzO8lrx8vLemf+Z3ogtRHO1s+vrTqgxUH11kVmG6CYwa8z1Tdikfqo+1YK9NcNwSQL
 7mqP9OzYgvGJAmIGllAfUs8n7tS2RN8cg1/FW+PDfFgwBXC91VFA0GPNXTRupduaAxQk
 Z49GgcRQqRfQDufhSi4ZPreopMVC250/ME3+52NPFmDMVi6+XjQl7GZHuhE6Q4dE0ymZ
 2Ybu4BVn2+dCcfh034pZYhm5SRjH+PQXjoPbDocCQVJd05Ff7z2JwM/2iVyq4y5Pd+tp
 59iQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=VAdjYAnJCaRdOh9WLdYqu394XALlieQPTYEnG04wNb0=;
 b=QKWcaNUjU7vspKsug9Y4BrsUPbLrryFljpswLfJAX1iuaqhJH0uKt3sX2DSNYHGRG7
 oi8Hh8petDi3D/PXN4ItdDwVILd1h1RPbO5Vc5u9cMowGjICDx4+vA6GXOIhUlOX5wqZ
 ioZICelG/tGETPuabmaZPgjSYwL2SxMk4GODuR0odqY6kboobnhSP+JAUeh0nmrHDmHc
 ZciuCWP+pAxDNipsVMrJdSLl2RQfOY/DrLCRECVZq5ZuiaCFk/CtcMR0Mk9TuMvWzNCO
 2NZRN8Wh0pSJdLyLYIRLHALK0WYWHPWlmPXe1m2h2tmXO0WMAVPGleuGPTDnsCqPZ7Xs
 HeQQ==
X-Gm-Message-State: AA+aEWY9Z256FOSv0YEEkSDtKriqxj3F5ttW/zj2AfP5MagjEg16yRmS
 /pKBD+ZXcE9p995Nuxk6IZDSaPkS5wnbiN4G+ENdqg==
X-Google-Smtp-Source: AFSGD/VWz9Y6D6nO1UEMlKgEbWtrxDXHcrLtCWlh8jmOFzCQq0eU6dqMyMi0Bhi1YvWrTUZrpW9fCOUyFqyo3BJ7ksM=
X-Received: by 2002:a17:906:d41:: with SMTP id
 r1-v6mr5385103ejh.186.1544304714217; 
 Sat, 08 Dec 2018 13:31:54 -0800 (PST)
MIME-Version: 1.0
References: <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN>
 <20181208204036.61878.qmail@HIDDEN>
In-Reply-To: <20181208204036.61878.qmail@HIDDEN>
From: Chris Hecker <checker@HIDDEN>
Date: Sat, 8 Dec 2018 13:31:42 -0800
Message-ID: <CAOdMLc1da--htqCC2+k4qfQDkbOB=SFhp=_nPeyeaTi67gMCug@HIDDEN>
Subject: Re: bug#33670: 26.1; very large c++-mode yank performance regression
 25.3_1-x86_64 -> 26.1-x86_64
To: Alan Mackenzie <acm@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000ea98b9057c8975d3"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000ea98b9057c8975d3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

It wasn=E2=80=99t a string, it was a single line function call.  Very simpl=
e code.

Like:

   Foo();

Chris


On Sat, Dec 8, 2018 at 12:40 Alan Mackenzie <acm@HIDDEN> wrote:

> Hello, Chris.
>
> In article <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN> you wrote=
:
>
> > Hi, I recently upgraded from 25.3_1 to to 26.1 on Windows 7 x64 and I'v=
e
> > noticed a very large performance regression on yanks in C++ mode buffer=
s
> > (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 g=
o
> > 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%
> >            - #<compiled 0x9dcce1>                  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%
> >               - #<compiled 0xfcb439>                1   7%
> >                  c-depropertize-CPP                 1   7%
> > - ...                                               0   0%
> >    Automatic GC                                     0   0%
>
> What is this line that you kill, then yank?  The profiler report
> suggests that it has something to do with raw strings, and I wouldn't be
> at all surprised if the line contains the opening delimiter or closing
> delimiter of quite a big raw string.
>
> > 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.
>
> There was no raw string handling at all in Emacs 25.3, so it is not
> surprising that CC Mode is much faster, there.  When a raw string is
> started or terminated, CC Mode needs to check, potentially, the rest of
> the buffer for characters which need "text properties" changing on them.
> This can be time consuming.
>
> However, a change to a line in the inside of a raw string shouldn't be
> slow, and if it is, that's a bug.
>
> > 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=3Dx86_64-w64-mingw32
> >  --without-compress-install 'CFLAGS=3D-O2 -static -g3''
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>
>

--000000000000ea98b9057c8975d3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div><div dir=3D"auto">It wasn=E2=80=99t a string, it was a single line fun=
ction call.=C2=A0 Very simple code.</div></div><div dir=3D"auto"><br></div>=
<div dir=3D"auto">Like:</div><div dir=3D"auto"><br></div><div dir=3D"auto">=
=C2=A0 =C2=A0Foo();</div><div dir=3D"auto"><br></div><div dir=3D"auto">Chri=
s</div><div dir=3D"auto"><br></div><div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr">On Sat, Dec 8, 2018 at 12:40 Alan Mackenzie &lt;<a href=3D"mai=
lto:acm@HIDDEN">acm@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex">Hello, Chris.<br>
<br>
In article &lt;<a href=3D"mailto:mailman.5359.1544236991.1284.bug-gnu-emacs=
@gnu.org" target=3D"_blank">mailman.5359.1544236991.1284.bug-gnu-emacs@gnu.=
org</a>&gt; you wrote:<br>
<br>
&gt; Hi, I recently upgraded from 25.3_1 to to 26.1 on Windows 7 x64 and I&=
#39;ve<br>
&gt; noticed a very large performance regression on yanks in C++ mode buffe=
rs<br>
&gt; (it feels slower in many other operations as well, but I actually<br>
&gt; measured yank with the profiler).=C2=A0 This happens even starting wit=
h with<br>
&gt; emacs -Q.<br>
<br>
&gt; If I start emacs and visit a moderately large cpp file (18k LOC), and =
go<br>
&gt; to the same place in the middle of the file in both versions of emacs,=
<br>
&gt; then kill and yank the current line, the performance on 26.1 is easily=
<br>
&gt; 10x worse...the yank is instant in 25.3_1 and takes literally almost a=
<br>
&gt; second on 26.1 sometimes.=C2=A0 I decided to test this with a profiler=
 run,<br>
&gt; so I went to the same line in both, killed the line, and evaled this:<=
br>
<br>
&gt; (progn (profiler-start &#39;cpu) (yank) (profiler-report) (profiler-st=
op))<br>
<br>
&gt; Here are the results:<br>
<br>
&gt; 25.3_1:<br>
<br>
&gt; - ...=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01 100%<br>
&gt;=C2=A0 =C2=A0 Automatic GC=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A01 100%<br>
<br>
<br>
&gt; 26.1:<br>
&gt; - command-execute=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 14 100%<=
br>
&gt;=C2=A0 - call-interactively=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 14 100%<br>
&gt;=C2=A0 =C2=A0- funcall-interactively=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 14 100%<br>
&gt;=C2=A0 =C2=A0 - eval-expression=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A014=
 100%<br>
&gt;=C2=A0 =C2=A0 =C2=A0- eval=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A014 100%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 - progn=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A014 100%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0- yank=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A014 100%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 - insert-for-yank=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A014=
 100%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- insert-for-yank-1=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 14 100%<=
br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - c-after-change=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 13=
=C2=A0 92%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- mapc=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A013=C2=A0 92%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - #&lt;compiled 0x9dcce1&gt;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 13=C2=A0 92%=
<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- c-after-change-re-mar=
k-raw-strings=C2=A0 =C2=A0 6=C2=A0 42%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - c-in-literal=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A03=C2=A0 21%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- c-state-semi-p=
p-to-literal=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3=C2=A0 21%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 c-parse-=
ps-state-below=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A03=C2=A0 21%<b=
r>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- c-restore-&lt;&gt;-pr=
operties=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A04=C2=A0 28%<=
br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 c-syntactic-re-=
search-forward=C2=A0 =C2=A0 =C2=A0 =C2=A0 4=C2=A0 28%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0c-neutralize-syn=
tax-in-CPP=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3=C2=A0 21%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - remove-yank-excluded-properties=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- remove-list-of-text-properti=
es=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - c-after-change=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A01=C2=A0 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- c-before-change=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A01=C2=A0 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - mapc=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01=C2=A0 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- #&lt;compiled =
0xfcb439&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0=
 =C2=A07%<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 c-deprop=
ertize-CPP=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01=
=C2=A0 =C2=A07%<br>
&gt; - ...=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00=C2=A0 =C2=A00%<br>
&gt;=C2=A0 =C2=A0 Automatic GC=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A00=C2=A0 =C2=A00%<br>
<br>
What is this line that you kill, then yank?=C2=A0 The profiler report<br>
suggests that it has something to do with raw strings, and I wouldn&#39;t b=
e<br>
at all surprised if the line contains the opening delimiter or closing<br>
delimiter of quite a big raw string.<br>
<br>
&gt; I&#39;m going to try the older cc-mode with the newer emacs and see if=
 that<br>
&gt; fixes it, but I figured I&#39;d report this bug now in case you haven&=
#39;t<br>
&gt; gotten other reports yet.<br>
<br>
There was no raw string handling at all in Emacs 25.3, so it is not<br>
surprising that CC Mode is much faster, there.=C2=A0 When a raw string is<b=
r>
started or terminated, CC Mode needs to check, potentially, the rest of<br>
the buffer for characters which need &quot;text properties&quot; changing o=
n them.<br>
This can be time consuming.<br>
<br>
However, a change to a line in the inside of a raw string shouldn&#39;t be<=
br>
slow, and if it is, that&#39;s a bug.<br>
<br>
&gt; Thanks,<br>
&gt; Chris<br>
<br>
<br>
&gt; In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)<br>
&gt;=C2=A0 of 2018-05-30 built on CIRROCUMULUS<br>
&gt; Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea<br>
&gt; Windowing system distributor &#39;Microsoft Corp.&#39;, version 6.1.76=
01<br>
&gt; Recent messages:<br>
&gt; For information about GNU Emacs and the GNU system, type C-h C-a.<br>
&gt; spyparty_ui.cpp has auto save data; consider M-x recover-this-file<br>
&gt; Mark saved where search started<br>
&gt; Mark set<br>
&gt; Quit<br>
&gt; CPU profiler started<br>
&gt; Mark set<br>
&gt; CPU profiler stopped<br>
&gt; &quot;CPU profiler stopped&quot;<br>
&gt; C-; is undefined<br>
&gt; Quit [3 times]<br>
&gt; Configured using:<br>
&gt;=C2=A0 &#39;configure --without-dbus --host=3Dx86_64-w64-mingw32<br>
&gt;=C2=A0 --without-compress-install &#39;CFLAGS=3D-O2 -static -g3&#39;&#3=
9;<br>
<br>
-- <br>
Alan Mackenzie (Nuremberg, Germany).<br>
<br>
</blockquote></div></div>

--000000000000ea98b9057c8975d3--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 8 Dec 2018 20:40:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 15:40:41 2018
Received: from localhost ([127.0.0.1]:38803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVjOz-0004Gq-1M
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 15:40:41 -0500
Received: from colin.muc.de ([193.149.48.1]:48819 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1gVjOv-0004GV-MI
 for 33670 <at> debbugs.gnu.org; Sat, 08 Dec 2018 15:40:38 -0500
Received: (qmail 61880 invoked by uid 3782); 8 Dec 2018 20:40:36 -0000
Date: 8 Dec 2018 20:40:36 -0000
Message-ID: <20181208204036.61878.qmail@HIDDEN>
From: Alan Mackenzie <acm@HIDDEN>
To: Chris Hecker <checker@HIDDEN>
Subject: Re: bug#33670: 26.1;
 very large c++-mode yank performance regression 25.3_1-x86_64
 ->	26.1-x86_64
Organization: muc.de e.V.
In-Reply-To: <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN>
X-Newsgroups: gnu.emacs.bug
User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p4
 (amd64))
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Chris.

In article <mailman.5359.1544236991.1284.bug-gnu-emacs@HIDDEN> you wrote:

> 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%
>            - #<compiled 0x9dcce1>                  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%
>               - #<compiled 0xfcb439>                1   7%
>                  c-depropertize-CPP                 1   7%
> - ...                                               0   0%
>    Automatic GC                                     0   0%

What is this line that you kill, then yank?  The profiler report
suggests that it has something to do with raw strings, and I wouldn't be
at all surprised if the line contains the opening delimiter or closing
delimiter of quite a big raw string.

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

There was no raw string handling at all in Emacs 25.3, so it is not
surprising that CC Mode is much faster, there.  When a raw string is
started or terminated, CC Mode needs to check, potentially, the rest of
the buffer for characters which need "text properties" changing on them.
This can be time consuming.

However, a change to a line in the inside of a raw string shouldn't be
slow, and if it is, that's a bug.

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

-- 
Alan Mackenzie (Nuremberg, Germany).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 8 Dec 2018 07:49:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 02:49:51 2018
Received: from localhost ([127.0.0.1]:37530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVXN0-0001Fd-W5
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 02:49:51 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33565)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gVXMz-0001FQ-B1
 for 33670 <at> debbugs.gnu.org; Sat, 08 Dec 2018 02:49:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gVXMo-0001Xr-Vs
 for 33670 <at> debbugs.gnu.org; Sat, 08 Dec 2018 02:49:43 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43567)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gVXMo-0001Xa-QP; Sat, 08 Dec 2018 02:49:38 -0500
Received: from [176.228.60.248] (port=2156 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gVXMo-0003gh-Dt; Sat, 08 Dec 2018 02:49:38 -0500
Date: Sat, 08 Dec 2018 09:49:20 +0200
Message-Id: <83bm5w5ugv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Chris Hecker <checker@HIDDEN>
In-reply-to: <647599b2-0aae-8654-a662-a8142dd360d2@HIDDEN> (message from Chris
 Hecker on Fri, 7 Dec 2018 18:42:23 -0800)
Subject: Re: bug#33670: 26.1;
 very large c++-mode yank performance regression 25.3_1-x86_64 ->
 26.1-x86_64
References: <647599b2-0aae-8654-a662-a8142dd360d2@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33670
Cc: 33670 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Chris Hecker <checker@HIDDEN>
> Date: Fri, 7 Dec 2018 18:42:23 -0800
> 
> 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%
>            - #<compiled 0x9dcce1>                  13  92%
>             - c-after-change-re-mark-raw-strings    6  42%
>              - c-in-literal                         3  21%

Please load cc-mode.el manually as a .el file, and then do this
experiment again and show the profile.  As you see from the above,
most of the time is taken by some function in the
c-before-font-lock-functions, but it's hard to tell which, because
it is shown as a byte code.  Emacs 26 puts 5 functions on
c-before-font-lock-functions, whereas Emacs 25 used only 2, and it's
IMO important to see which one(s) take the lion's share of time.

Also, do you see this kind of degradation in any C++ source file of
comparable size, or is that particular file you used for the profile
especially slow?

Finally, was the line you yanked a line of code or a part of a
comment (or some other syntactic element)?  Does that matter?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at 33670 <at> debbugs.gnu.org:


Received: (at 33670) by debbugs.gnu.org; 8 Dec 2018 02:56:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 07 21:56:43 2018
Received: from localhost ([127.0.0.1]:37460 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVSnK-0001jg-Us
	for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:56:43 -0500
Received: from mail-pg1-f172.google.com ([209.85.215.172]:37496)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <checker@HIDDEN>) id 1gVSnJ-0001jT-1R
 for 33670 <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:56:41 -0500
Received: by mail-pg1-f172.google.com with SMTP id 80so2516552pge.4
 for <33670 <at> debbugs.gnu.org>; Fri, 07 Dec 2018 18:56:40 -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;
 bh=WWChb8862dfP68M5+VR1G2n7PLE0mPtOP2xpitzotQM=;
 b=DUp6P+HNfAkOltavZMCbz+jE8PTWdJPFqEkPn5YN3jHMZLvTFSRezMSqKvuLdDKiIc
 Q5n8jaMMT6VSvhGtODTLLKs5wesGHa+CtK1bdVV+gPmdWnJYSt8dzI3+uvO5eJashrNN
 qr5w5dimQb1XnAEsgQOKL/6oDkoTok5t8Jqs939Pv3lABWZPkHxkxgtsBIWn1DLNgQli
 MmjGrhd+L0Cj4+gZZqSuelz4c/SkODCuDpmDQDjTwblEyn7QmwJbCL4vHbp+sfHuBjqP
 EsulMI1oszRe0lHath6Jg9GUAT6yEl8qAIjikCPw3spTmtkha816VGs/LZIZj4ElNP4k
 uAHA==
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;
 bh=WWChb8862dfP68M5+VR1G2n7PLE0mPtOP2xpitzotQM=;
 b=fQT6dkvyn2ltSQKEUt/bvpuFFUg4iXH/BF74wM88TQZ6DwchFW7klKiwQO8Y4VOm1U
 GdcDEBApCT18aEJbOSO9gX6MiNbGnxgX6X6B2f9VRle9SvC3kCj+xlirnJ8ZdOrTRvJU
 esDxfAGjqo9fomsnBcLrx3AoNxlUQbLSSbmrH8onRGDcdUf/pZWJhsTpv7K9+H9z6hpd
 3/GzUPpyWnk3UZUa9JQdP8e88/kxG7//HjpTB3CnEvsCmbekxAJRWvaBwdj8UcQjMDTS
 p+1nIEB2J2pZu/gzyh+phXwgY7m8CH0xCaTrt79GRgmsh1BbmZFXNM9tiMXn6Kjr0Fx8
 JL3Q==
X-Gm-Message-State: AA+aEWYE7cquMbt+dhTFGUGOGXHMHWsHMLBjxFpaRqrSL4nCsZ14UYe/
 97ekb7SygqzvRWJP5OPUjDYEL4lEwh4=
X-Google-Smtp-Source: AFSGD/X4j8BdwpgdQ/AKcbWKikRZ7Tytv0rqS7TE1+QSX4F4jv/Wz+oUEoqHrzzThNizB2fXN69OXw==
X-Received: by 2002:a63:f844:: with SMTP id v4mr4042846pgj.82.1544237794615;
 Fri, 07 Dec 2018 18:56:34 -0800 (PST)
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 m85sm6774885pfj.171.2018.12.07.18.56.33
 for <33670 <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 07 Dec 2018 18:56:33 -0800 (PST)
To: 33670 <at> debbugs.gnu.org
From: Chris Hecker <checker@HIDDEN>
Subject: adding some info to my yank perf regression
Openpgp: preference=signencrypt
Message-ID: <fc39055f-3d14-adbb-d5bd-d896e55fddd5@HIDDEN>
Date: Fri, 7 Dec 2018 18:56:45 -0800
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------1FF252FC0A20F5C3151C53A1"
Content-Language: en-US
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33670
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------1FF252FC0A20F5C3151C53A1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit


I just downgrated cc-mode to the one that shipped with 25.3_1 (c-version
5.32.99) and that fixed the yank perf on 26.1, so it's something either
in cc-mode directly or something changed in emacs that slows down
something in the latest 5.33.1 version of cc-mode.

Chris

--------------1FF252FC0A20F5C3151C53A1
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    I just downgrated cc-mode to the one that shipped with 25.3_1
    (c-version 5.32.99) and that fixed the yank perf on 26.1, so it's
    something either in cc-mode directly or something changed in emacs
    that slows down something in the latest 5.33.1 version of cc-mode.<br>
    <br>
    Chris<br>
  </body>
</html>

--------------1FF252FC0A20F5C3151C53A1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Dec 2018 02:42:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 07 21:42:29 2018
Received: from localhost ([127.0.0.1]:37455 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVSZZ-0001Oh-Cr
	for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:42:29 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54307)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <checker@HIDDEN>) id 1gVSZY-0001OS-4L
 for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:42:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <checker@HIDDEN>) id 1gVSZQ-0007jl-JV
 for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:42:22 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
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 <checker@HIDDEN>) id 1gVSZQ-0007je-Er
 for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 21:42:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35678)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <checker@HIDDEN>) id 1gVSZP-00038c-4G
 for bug-gnu-emacs@HIDDEN; Fri, 07 Dec 2018 21:42:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <checker@HIDDEN>) id 1gVSZL-0007il-1o
 for bug-gnu-emacs@HIDDEN; Fri, 07 Dec 2018 21:42:19 -0500
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 <checker@HIDDEN>) id 1gVSZK-0007iL-Oj
 for bug-gnu-emacs@HIDDEN; Fri, 07 Dec 2018 21:42:14 -0500
Received: by mail-pg1-x534.google.com with SMTP id n2so2507263pgm.3
 for <bug-gnu-emacs@HIDDEN>; 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)
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 <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 07 Dec 2018 18:42:11 -0800 (PST)
To: bug-gnu-emacs@HIDDEN
From: Chris Hecker <checker@HIDDEN>
Subject: 26.1; very large c++-mode yank performance regression 25.3_1-x86_64
 -> 26.1-x86_64
Openpgp: preference=signencrypt
Message-ID: <647599b2-0aae-8654-a662-a8142dd360d2@HIDDEN>
Date: Fri, 7 Dec 2018 18:42:23 -0800
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


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%
           - #<compiled 0x9dcce1>                  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%
              - #<compiled 0xfcb439>                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))





Acknowledgement sent to Chris Hecker <checker@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#33670; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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