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: Fri, 24 Jan 2020 09:40:18 +0200 Message-ID: <83iml1s3od.fsf@gnu.org> References: <83eevsx1eh.fsf@gnu.org> <83wo9jtncf.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="32284"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Anand Tamariya Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 24 08:41:26 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 1iutao-0008MO-4L for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 08:41:26 +0100 Original-Received: from localhost ([::1]:38364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iutan-0003H0-9V for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 02:41:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45892) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuta0-0002mF-UF for emacs-devel@gnu.org; Fri, 24 Jan 2020 02:40:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iuta0-0001N0-HU; Fri, 24 Jan 2020 02:40:36 -0500 Original-Received: from [176.228.60.248] (port=4931 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iutZz-00030t-Rd; Fri, 24 Jan 2020 02:40:36 -0500 In-reply-to: (message from Anand Tamariya on Thu, 23 Jan 2020 11:06:57 +0530) 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:244555 Archived-At: > From: Anand Tamariya > Date: Thu, 23 Jan 2020 11:06:57 +0530 > Cc: emacs-devel@gnu.org > > Also, what do you mean by "disable jit-lock"? Where does that happen? > And if you disable jit-lock, does that mean Emacs will no longer > fontify only the portions of the window it is about to display? > > There are some after change functions and region extend functions which are not really necessary with my > approach. Hence I had to disable those portions. Following call stack should help you better visualize. > - redisplay_internal (C function) 3 2% > - jit-lock-function 2 1% > - jit-lock-fontify-now 2 1% > - jit-lock--run-functions 2 1% > - run-hook-wrapped 2 1% > - # 2 1% > - font-lock-fontify-region 2 1% > - extract 2 1% (I suppose you meant "extend", not "extract"?) Then I'm unsure why you said you needed to "disable jit-lock". Removing the calls to CC mode's after-change hooks doesn't disable JIT font lock in any way. What am I missing? > > you could run a benchmark of scrolling through a > > large source file top to bottom, and show the results in terms of time > > and number of GCs. > > BTW I should admit that it is WIP. Right now, my focus is only on accuracy. I have made no attempts on > optimization. So consider the results accordingly. > > * Off GCs: 0 Elapsed time: 0.840946 seconds > * Custom GCs: 0 Elapsed time: 1.172106 seconds > * Builin GCs: 1 Elapsed time: 0.991606 seconds I'm not sure I understand these results. What does each line represent? Did you run the same benchmark with the default font-lock and with your modifications, and if so, which of these lines shows results for what variant of font-lock? >From my POV, the most important part of this work is to have infrastructure in place that would allow us to use additional syntax and semantics analyzers as the engine for fontification. So I'm especially interested in coming up with a set of settings and user options for selecting this or that analyzer, while keeping the overall design of JIT fontifcations as similar to what we have now as practically possible. Thanks.