From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Semantic font-lock for Java Date: Tue, 28 Jan 2020 19:50:16 +0200 Message-ID: <838slro4h3.fsf@gnu.org> References: <83eevsx1eh.fsf@gnu.org> <83wo9jtncf.fsf@gnu.org> <83iml1s3od.fsf@gnu.org> <83k15grflg.fsf@gnu.org> <87tv4kyelp.fsf@randomsample> <83iml0r5fw.fsf@gnu.org> <87pnf8y4i8.fsf@randomsample> <878slr5wfu.fsf@randomsample> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="18834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, atamariya@gmail.com To: David Engster Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 28 18:51:25 2020 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 1iwV1J-0004pB-5O for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 18:51:25 +0100 Original-Received: from localhost ([::1]:34628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwV1H-0001fL-UO for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 12:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51807) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwV0P-0000qS-8g for emacs-devel@gnu.org; Tue, 28 Jan 2020 12:50:30 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iwV0M-00010t-M1; Tue, 28 Jan 2020 12:50:27 -0500 Original-Received: from [176.228.60.248] (port=1907 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iwV0I-0001Co-0u; Tue, 28 Jan 2020 12:50:25 -0500 In-reply-to: <878slr5wfu.fsf@randomsample> (message from David Engster on Tue, 28 Jan 2020 18:21:09 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:244723 Archived-At: > From: David Engster > Cc: Eli Zaretskii , emacs-devel@gnu.org > Date: Tue, 28 Jan 2020 18:21:09 +0100 > > > Perfect explanation David. Though I'll add that parsing is not > > terribly slow. It's usable. Here's a demo video showcasing the same > > https://youtu.be/4UcPIdTJLOM . > > Note that Semantic will cache the AST between sessions, so if you've > loaded that file before, it will just load the cache. > > The time needed for parsing varies wildly between languages. The Java > parser is one of the faster ones, because it's an LALR parser, which is > more efficient than LL (which Semantic uses for C and C++). It is also > very old, and at that time (around Java 1.4 or so) the language was > still very easy to parse (it doesn't support generics, for instance). Thanks. I'd be interested to see the times of showing the first windowful of a Java file visited for the first time, and then the same file visited again, first unchanged, and then with some small changes in the first windowful. Comparisons of these times with the default font-lock would be useful for assessing the feature. (If the same can be done for C/C++, that's be better yet.)