From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Anand Tamariya Newsgroups: gmane.emacs.devel Subject: Re: Semantic font-lock for Java Date: Fri, 24 Jan 2020 21:45:55 +0530 Message-ID: References: <83eevsx1eh.fsf@gnu.org> <83wo9jtncf.fsf@gnu.org> <83iml1s3od.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000221500059ce51349" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="127587"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 24 17:17: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 1iv1ds-000X8Y-Fv for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 17:17:08 +0100 Original-Received: from localhost ([::1]:44144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv1dr-0004GT-KX for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 11:17:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35388) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv1cw-0003HX-VQ for emacs-devel@gnu.org; Fri, 24 Jan 2020 11:16:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv1cv-0002qF-Os for emacs-devel@gnu.org; Fri, 24 Jan 2020 11:16:10 -0500 Original-Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:42923) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iv1ct-0002pA-6b; Fri, 24 Jan 2020 11:16:07 -0500 Original-Received: by mail-io1-xd34.google.com with SMTP id n11so2520757iom.9; Fri, 24 Jan 2020 08:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zklDsysV7XMDpgQMY085uqz2PRLRTaV3iN27nFIv7fU=; b=e2M4cE08On6p3rOHOiAUwY5e1n9rbz/b+A/nAUltk03jz1GkyvA8Gx3IQn9bsyXnxO 6/MK1JVRzkTYYN7WOBjs9HddIcKa/mXXTDJzBXnxT1jP0i+KFBWASfXZtWSuUwy8Oznw MVrdCntJwiUMbe1GmTWlaEL+QTghox//xvb8nqcfG4kMrEQ62c+aH2XY4X0J8FLuEScC OzD1Ff2HH5ifT4Hxf4mim36mqGWEkWs/cZ0MhHcpMGoRg03ixwxM+a8QBPbCCSmrW2TI H9IRPCao+kMXU9OifT9uNGG2YWk0lOIlYkqkWKRz7obOM/2qFHunvsdKT47+7Hi+YH6z 4VVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zklDsysV7XMDpgQMY085uqz2PRLRTaV3iN27nFIv7fU=; b=hjzgJhy5JvzOnQ99RNTcqzlSgta2rAn5HFu9u5RhD5STHEsVyHAmflSh08xnyo3VKR r2RkVSSPMv6AniR0ZR+hxQlTKRvkiEIM+ZUAukRzZFCYikMXF6vk0QiaWfuvtIBf/eaq lmrepP2jH5UniEHmcgToeWywBpU+oiVDvn2OcBP2Mvkm986ulzAwcJPPrYd6yfvy7Biq 9LqJ4M+VQVt6m/Ql8o3DqTAFd9aSXLEg3Sj2Mj82Ndzdm8CF1XN/jO23ljkxcPwm8JoN 59ht52bRAVe1hlEL221j3zEi891mR9h97uWLCUldKuOCesLQvwmYxkqMyUSKqnUmzhlE tm0A== X-Gm-Message-State: APjAAAWWxV43msbpw+8DTFsi3gVRn3+m6TdrtS4XXsB5gWt+lxcEA/7e 4KDURmzEyLl8td5EE7w+lYI6EsieVDOCCMlMlfPE04/nUfc= X-Google-Smtp-Source: APXvYqyZo6zWtz+qqyMz3GfT8jchxP9z1gUf9BQQeWMxcMUNOqzr3TsRoSwaBO4eNbrtSC8d0tQs4pGvxjTr/BVA+eE= X-Received: by 2002:a05:6638:81:: with SMTP id v1mr3053534jao.143.1579882565995; Fri, 24 Jan 2020 08:16:05 -0800 (PST) In-Reply-To: <83iml1s3od.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d34 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:244576 Archived-At: --000000000000221500059ce51349 Content-Type: text/plain; charset="UTF-8" > > - font-lock-fontify-region 2 > 1% > > - extract 2 > 1% > > (I suppose you meant "extend", not "extract"?) > I was referring to font-lock-extend-region-functions variable. "extract" function name is just a temporary short name. Makes my testing easier. Will name it something better when I've it working according to my preferences. 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? > I added in clarification that I had to **disable portions** . Look at lisp/progmodes/cc-mode.el (746-748). Those lines are commented. Similarly some other places in cc-mode.el and font-lock.el are commented. > * 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? > > Off - Refers to when font-lock is disabled Custom - Refers to when my "extract" function is doing the fontification Builtin - Refers to jit-lock mode as that's the default for font-lock mode Hope that helps. --000000000000221500059ce51349 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0 =C2=A0 =C2=A0 =C2=A0- font-lock-fontify-region=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2=C2=A0 =C2=A01%
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 - extract=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= =C2=A0 =C2=A01%

(I suppose you meant "extend", not "extract"?)
I was referring to font-lock-extend-region-functions variable.= "extract" function name is just a temporary short name. Makes my= testing easier. Will name it something better when I've it working acc= ording to my preferences.

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.=C2=A0 What am I missing?
I added= in clarification that I had to **disable portions** . Look at lisp/progmod= es/cc-mode.el (746-748). Those lines are commented. Similarly some other pl= aces in cc-mode.el and font-lock.el are commented.

=
> * 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.=C2=A0 What does each line
represent?=C2=A0 Did you run the same benchmark with the default font-lock<= br> and with your modifications, and if so, which of these lines shows
results for what variant of font-lock?

Off - Refers to when font-lock is disabled
= Custom - Refers to when my "extract" function is doing the fontif= ication
Builtin - Refers to jit-lock mode as that's the defau= lt for font-lock mode

Hope that helps.
--000000000000221500059ce51349--