GNU bug report logs - #43631
28.0.50; CC Mode multiline strings grinds performance to a halt

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: Theodor Thornhill <theo@HIDDEN>; dated Sat, 26 Sep 2020 11:18:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 26 Sep 2020 11:17:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 26 07:17:38 2020
Received: from localhost ([127.0.0.1]:45961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kM8Cv-0006ww-S8
	for submit <at> debbugs.gnu.org; Sat, 26 Sep 2020 07:17:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:42348)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1kM8Cr-0006wm-86
 for submit <at> debbugs.gnu.org; Sat, 26 Sep 2020 07:17:36 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58786)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <theo@HIDDEN>) id 1kM8Cq-0005X5-Uh
 for bug-gnu-emacs@HIDDEN; Sat, 26 Sep 2020 07:17:33 -0400
Received: from out1.migadu.com ([2001:41d0:2:863f::]:37760)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <theo@HIDDEN>) id 1kM8Cm-0004qZ-Pr
 for bug-gnu-emacs@HIDDEN; Sat, 26 Sep 2020 07:17:32 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1601119045;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=FR5GZPaZ8C4dz/HWAdha/gZmqev8RZP+oavGs9toxcE=;
 b=dAWpOOUU1qPE/kDU/sKZKIXEHQ/WLxnpiAy9FWLdqHDAmpddlRr5GSnMAdncFLTFW9yxY4
 9kf5P7s7mxa7M3iBXwlwDVo9IVMX0m8xQgiVqi+kY+O97bmIt1UPBlXChioen7UNLG68Dg
 tR1QAcZki2uzc2qjpQyCbPXGnYgmVgmEpzcbdsf+foAraF2d7adMbUH++2QIAs/gB8GdsQ
 uhXH+Kib5Rlf9cnaPoyMMywkdsi8DESn3RCCQE8UX+mB9Si8M1ikKaJwAjaPog28lgyLIZ
 zEaKHsSzxfMczKvofzf/jlpzdXm6+Lo8I5hWuieR5TqG1Jvm3i+g5BAC49fzpA==
From: Theodor Thornhill <theo@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; CC Mode multiline strings grinds performance to a halt
Date: Sat, 26 Sep 2020 13:17:29 +0200
Message-ID: <87lfgwwzw6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.10
Received-SPF: pass client-ip=2001:41d0:2:863f::;
 envelope-from=theo@HIDDEN; helo=out1.migadu.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/26 07:17:26
X-ACL-Warn: Detected OS   = ???
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)


Hello there!

While creating a new mode derived from CC Mode, we noticed performance
is affected heavily when setting a character for
'c-multiline-string-start-char'. There is a discussion around this that
can be found at https://github.com/josteink/csharp-mode/issues/164,
and we were given an easily reproducible repo for this. It is verified
to slow typing down both in 'csharp-mode', 'pike-mode' and in this test
case:
https://github.com/unhammer/csharp-mode/tree/164-repro

I think (unconvincingly) that some of the problematic code is situated
around line 2047 in 'cc-mode.el', but this is only a guess taken from
some light profiling.

The issue is described well on github, and I think me trying to
reiterate that here will only cause subtle confusions.

One thing of note is that you don't even have to have any multiline
strings for this performance hit to occur, meaning all 'csharp-mode'
files do suffer from this.

Let me know if something is still unclear, and I'll try to bring up some
more information.

All the best,
Theodor Thornhill




Acknowledgement sent to Theodor Thornhill <theo@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#43631; 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: Sat, 26 Sep 2020 11:30:02 UTC

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