From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Semantic font-lock for Java Date: Tue, 28 Jan 2020 18:21:09 +0100 Message-ID: <878slr5wfu.fsf@randomsample> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20677"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Anand Tamariya Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 28 18:22:09 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 1iwUYy-0005Kb-DS for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 18:22:08 +0100 Original-Received: from localhost ([::1]:34292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwUYx-0007fz-Gw for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 12:22:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45601) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwUYP-0007Bq-Vs for emacs-devel@gnu.org; Tue, 28 Jan 2020 12:21:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwUYO-0004By-Kl for emacs-devel@gnu.org; Tue, 28 Jan 2020 12:21:33 -0500 Original-Received: from randomsample.de ([5.45.97.173]:59178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwUYO-00043x-7w; Tue, 28 Jan 2020 12:21:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=gXdF64Wh0SGAo7nb9KszzMdvyeY3lZ7p0/Mj6BxhU4E=; b=QxRYHzrMS0Ph1R9HTSv5+4GHQG4OvZ+SLnsNhn0QrRGdUkrSW55aDZ/vWcJey4w61lqDGS4j/aik0m9RDn2zIc+wcasZaJZtxvm3fzkJtM3ftApl3zFovaFj0mcmmX//; Original-Received: from ip5f5ababe.dynamic.kabel-deutschland.de ([95.90.186.190] helo=void) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1iwUYG-0002Mr-KP; Tue, 28 Jan 2020 18:21:24 +0100 In-Reply-To: (Anand Tamariya's message of "Tue, 28 Jan 2020 21:20:53 +0530") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 5.45.97.173 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:244719 Archived-At: > So my guess is the scroll benchmark is simply 17% slower > > because there are more overlays in the buffer, not because of > actual > parsing. > > 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). -David