From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Bug #25608 and the comment-cache branch Date: Sun, 12 Feb 2017 10:47:23 +0000 Message-ID: <20170212104722.GA3087@acm> References: <20170202202418.GA2505@acm> <83lgtouxpf.fsf@gnu.org> <20170202215154.GB2505@acm> <83h94bvhzw.fsf@gnu.org> <20170203172952.GC2250@acm> <0a40d539-b7bc-2655-5429-6280022106ee@yandex.ru> <20170204102410.GA2047@acm> <8f9e68fc-4314-625d-b4bf-796c71c91798@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1486896483 25246 195.159.176.226 (12 Feb 2017 10:48:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2017 10:48:03 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) To: Dmitry Gutov , Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 11:47:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccrhD-0005ux-Ei for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2017 11:47:55 +0100 Original-Received: from localhost ([::1]:51398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccrhH-0004KX-B5 for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2017 05:47:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccrhA-0004JK-17 for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:47:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccrh5-00079I-4w for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:47:52 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:21507 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ccrh4-00077d-VE for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:47:47 -0500 Original-Received: (qmail 62366 invoked by uid 3782); 12 Feb 2017 10:47:44 -0000 Original-Received: from acm.muc.de (p548C7DA1.dip0.t-ipconnect.de [84.140.125.161]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 12 Feb 2017 11:47:43 +0100 Original-Received: (qmail 3903 invoked by uid 1000); 12 Feb 2017 10:47:23 -0000 Content-Disposition: inline In-Reply-To: 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 [fuzzy] X-Received-From: 193.149.48.4 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:212271 Archived-At: Hello, John. On Sat, Feb 11, 2017 at 18:53:58 -0800, John Wiegley wrote: > >>>>> "DG" == Dmitry Gutov writes: > GD> One normally adds an alternative source of truth (i.e. a "cache") to fix a > DG> significant performance problem, when one really can't do so otherwise. > DG> It seems we agree now that comment-cache's existence can't be justified by > GD> performance considerations. > DG> Cache invalidation is a known hard problem in CS, so we generally don't > GD> want to have extra caches. > This argument right here is why I would vote against comment-cache: I'd rather > have parens-in-comments-at-column-0 parsed incorrectly -- at least, until > syntax-ppss is fixed -- than to add another cache just to fix this problem. > Unless I've missed something... What you've missed is that the cache invalidation in comment-cache is rock solid - with the exception that it doesn't watch parse-sexp-lookup-properties and parse-sexp-ignore-comments, variables that are typically used only in initialisation. If this were deemed a flaw, it could be fixed very easily. The other thing is that syntax-ppss doesn't look like getting fixed. Bug #22983 has been open for almost a year, despite requests to have it fixed. Also syntax-ppss's cache invalidation is less than rigorous. Yet another thing is that it is me that is having to field the open-paren-in-column-0-in-comment bugs, which typically happen in CC Mode, and it is a demoralising waste of time each time it happens. Recently, I've been telling the bug raisers that there's a fix which should hopefully appear in Emacs 26. With all honesty, I don't think I can say that any more. > -- > John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F > http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 -- Alan Mackenzie (Nuremberg, Germany).