From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tadeus Prastowo Newsgroups: gmane.emacs.devel Subject: Re: Processing speed in large C++ raw strings. Date: Fri, 26 Apr 2019 22:15:28 +0200 Message-ID: References: <20190425183615.GB19807@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="179732"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 26 22:15:57 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hK7GE-000kZi-8S for ged-emacs-devel@m.gmane.org; Fri, 26 Apr 2019 22:15:54 +0200 Original-Received: from localhost ([127.0.0.1]:51563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hK7GD-0004aE-8h for ged-emacs-devel@m.gmane.org; Fri, 26 Apr 2019 16:15:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hK7G5-0004Wu-Ri for emacs-devel@gnu.org; Fri, 26 Apr 2019 16:15:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hK7G4-0005vF-Fr for emacs-devel@gnu.org; Fri, 26 Apr 2019 16:15:45 -0400 Original-Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:45176) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hK7G3-0005uJ-Ob for emacs-devel@gnu.org; Fri, 26 Apr 2019 16:15:44 -0400 Original-Received: by mail-io1-xd34.google.com with SMTP id e8so3921768ioe.12 for ; Fri, 26 Apr 2019 13:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unitn.it; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x6Jq8AEMUPfk+ZvGfnV6q8TxiWW0uUWzhe0sDNwiSzQ=; b=lIkgRQTGWNtwlUDNiaS64HFRZfeBzV1z6mlwCbXezW0Po0gNeof/Pvw8Xy/gjVl6IV nNF6s5NL/qqvjKTMe8TmsHbAeOp2HVmPGbQGxZPz5QHBtSZBSn+ibreHsDd7keuMYRCI SF45knanYq4w1k2YDrcK3qFN81T9n/7qmztg8= 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=x6Jq8AEMUPfk+ZvGfnV6q8TxiWW0uUWzhe0sDNwiSzQ=; b=t13oxkmHTYWKj2V5iRNA4unEFQjISmSsrRCn1eo7ehfoqKmsxdTv7Qx4uYilZWUx1A OLmkH+yvnKDsY2gvwmBuhK7g0csu3DHFZOzcP6bHKkKDLt1z2rAbT9B7YIM/6C9qKp7A IL0SzH/AVTaHAew7YWzkFexZSIN4FbMF17wZ1UT4i/8w9Aj0fl/bDuuMDhcsHqK+Sxhk ryjQSWaDSUsPHEq9mzAH0uJ73jrigUEAyc7ViyGqUOemhJhxmR4qZLrjDiuKZDWtRA7Z GDq1fX8sA8msbVnC5uhUdBh0nX6H88DHV4dfBiLJJ+BvqXKGadoFmC2t2o/t0huQwRdz Bq+g== X-Gm-Message-State: APjAAAXJiy3WT3rBdHV+A7dGh2yzZ4EsSPXJAvZjuq0aUlw5CS9fJi7m zBwCZzpaj3Ky+cRIDFhn78YGHLePhPWLw0Pk5pV5ZfN79g== X-Google-Smtp-Source: APXvYqxyYeLNfyILRivXcNT5yyU5fC1fRQ4Oi1mKx1Y5RyL/hgIBGDcddoKILKbpu8suYA3hVqSHU3+58VaXXb23SaA= X-Received: by 2002:a5d:9cd6:: with SMTP id w22mr9978201iow.289.1556309739894; Fri, 26 Apr 2019 13:15:39 -0700 (PDT) In-Reply-To: <20190425183615.GB19807@ACM> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d34 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:235969 Archived-At: Hi Alan, On Thu, Apr 25, 2019 at 8:41 PM Alan Mackenzie wrote: > I have now optimized CC Mode, such that each such self-insert-command > now takes around 0.07s-0.1s. I used two strategies for this: (i) breaking out > of (expensive) fontification routines early, when the region being > fontified is nothing but a string; (ii) Not fontifying the entire raw > string for a change to only a small part of it. I have been working with C++ template metaprograms for two years, and since quite early, I have experienced CC Mode being very sluggish that I often switch back-and-forth between cc-mode and text-mode. I have not made any report since I don't feel like sparing my time to collect some data for the report now that switching to text-mode does the trick. So, since you are already at it, perhaps you may want to find out why even scrolling the buffer in cc-mode is very slow when visiting the file at http://git.savannah.nongnu.org/cgit/tice.git/plain/tests/v1/test-v1_internals_program.cpp? Specifically, I built master at commit 82fc8ca6ba179596928db614ab903e44968ef44e and fired the result with `emacs -Q' to visit the file locally. Then, to experience the sluggishness, I pressed M-> followed by M-v several times. To further experience it, I started to edit some template parameters, such as changing `node1' to node `node5' in line 680. Thank you very much for your work. > -- > Alan Mackenzie (Nuremberg, Germany). -- Best regards, Tadeus