From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: font-lock-syntactic-keywords obsolet? Date: Mon, 27 Jun 2016 11:48:50 +0000 Message-ID: <20160627114850.GA4526@acm.fritz.box> References: <23d7473e-50da-b6dc-17a7-1fec4aad6bfa@yandex.ru> <20160620152535.GB2192@acm.fritz.box> <076b7311-ad16-4913-b0ec-fc73ea4550a1@yandex.ru> <20160620181218.GC2192@acm.fritz.box> <20160620200830.GE2192@acm.fritz.box> <18697155-06d3-2191-6a6b-3ea58e8d17cb@yandex.ru> <20160621144047.GB3177@acm.fritz.box> <20160623163021.GA4946@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467028158 8738 80.91.229.3 (27 Jun 2016 11:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 11:49:18 +0000 (UTC) Cc: emacs-devel@gnu.org, Noam Postavsky To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 13:49:09 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bHV2I-0007Ll-Aj for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 13:49:06 +0200 Original-Received: from localhost ([::1]:57996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHV2C-0008By-8o for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 07:49:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHV23-0008AS-41 for emacs-devel@gnu.org; Mon, 27 Jun 2016 07:48:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHV1y-0006cI-4G for emacs-devel@gnu.org; Mon, 27 Jun 2016 07:48:50 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:62763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHV1x-0006c2-QL for emacs-devel@gnu.org; Mon, 27 Jun 2016 07:48:46 -0400 Original-Received: (qmail 35802 invoked by uid 3782); 27 Jun 2016 11:48:42 -0000 Original-Received: from acm.muc.de (p548C72E2.dip0.t-ipconnect.de [84.140.114.226]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 27 Jun 2016 13:48:40 +0200 Original-Received: (qmail 4551 invoked by uid 1000); 27 Jun 2016 11:48:51 -0000 Content-Disposition: inline In-Reply-To: <20160623163021.GA4946@acm.fritz.box> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204801 Archived-At: Hello, Dmitry. On Thu, Jun 23, 2016 at 04:30:21PM +0000, Alan Mackenzie wrote: > On Wed, Jun 22, 2016 at 02:50:58AM +0300, Dmitry Gutov wrote: > > On 06/21/2016 05:40 PM, Alan Mackenzie wrote: > > > Yes, no, and N/A, respectively. Try out this raw string support, > > > sometime. > > Here's some results: a performance degradation example, and a way to > > break CC Mode, apparently. > Thanks for doing this test and telling me about it. > > First, paste this near the top of xdisp.c (I did it after the big > > comment and before the header includes, but this is probably not too > > important): > > const char* s1 = R"foo( > > Hello > > World > > )foo"; > > and switch to c++-mode. > > 1) Delete the last double-quote, then type it again. Deletion is > > noticeably slow (even though bearably so: feels like 0.5 sec), restoring > > it is faster. [ .... ] > Thanks. I've just committed a patch which should fix your exact > scenario. As I said, there's a little more to do. What was going wrong was typing characters into a C++ raw string when there was no closing delimiter at all was very sluggish. This was because a lot of scanning to the "end of the literal" (i.e. here the end of the buffer) was being done needlessly. I've sorted this out, and typing into a raw string now doesn't cause a delay. -- Alan Mackenzie (Nuremberg, Germany).