From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 12 Jun 2021 11:08:30 +0300 Message-ID: <83o8cb8pz5.fsf@gnu.org> References: <83k0n2cjg5.fsf@gnu.org> <83im2lbqmv.fsf@gnu.org> <179f6e4fa40.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <83fsxpbpn9.fsf@gnu.org> <83k0n09tkp.fsf@gnu.org> <837dj09p0e.fsf@gnu.org> <83wnqz8tuq.fsf@gnu.org> <179ff3c71f0.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3023"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org, rudalics@gmx.at To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 12 10:09:36 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lryi0-0000b2-1D for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 10:09:36 +0200 Original-Received: from localhost ([::1]:42814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lryhy-0003Vb-VH for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 04:09:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lryhB-0002pZ-AO for emacs-devel@gnu.org; Sat, 12 Jun 2021 04:08:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35048) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lryhA-0007uG-Ob; Sat, 12 Jun 2021 04:08:44 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4126 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lryh4-0004T1-FS; Sat, 12 Jun 2021 04:08:38 -0400 In-Reply-To: <179ff3c71f0.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (message from Daniel Colascione on Sat, 12 Jun 2021 01:00:22 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270746 Archived-At: > From: Daniel Colascione > CC: , , , > Date: Sat, 12 Jun 2021 01:00:22 -0700 > > > It is a problem given how much the current fast machines can do during > > that time. At 3 GHz, 30 msec of CPU time is equivalent to 100 million > > machine instructions. > > And if you count electrons, the numbers are in the trillions. So what? Who > cares how many machine instructions it is? What matters is the latency. I'm saying that, given how much these machines can do in 30 msec, it doesn't sound right that we cannot refontify 35 lines of text with all that processing power. It tells me that our code is either very inefficient or does a lot of unnecessary processing (or both). Alan thought that the performance we have is acceptable. The numbers I mentioned would hopefully convince him otherwise. > > We should either find a way of making this analysis faster, or give up > > on fontifying these two cases differently. It is IMO unacceptable > > that redisplay is slowed down so much by mode-specific fontifications. > > This is a great example of where incorrect fontification diminishes the > utility of syntax highlighting more generally. If I can't trust the color > of a symbol to distinguish a variable declaration from a type declaration, > why bother fontifying as either? I think we are saying the same, just in different words. Do you agree that slowing down redisplay so much due to fontification is unacceptable?