all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Anand Tamariya <atamariya@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Semantic font-lock for Java
Date: Fri, 24 Jan 2020 09:40:18 +0200	[thread overview]
Message-ID: <83iml1s3od.fsf@gnu.org> (raw)
In-Reply-To: <CADm7Y4kk14xxx1b7heTJYusC+Kqvqadr2c4DXQGEy_63bp-W2A@mail.gmail.com> (message from Anand Tamariya on Thu, 23 Jan 2020 11:06:57 +0530)

> From: Anand Tamariya <atamariya@gmail.com>
> 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%
>      - #<compiled 0x158872bab969>                                   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.



  reply	other threads:[~2020-01-24  7:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 11:39 Semantic font-lock for Java Anand Tamariya
2020-01-21 15:41 ` Eli Zaretskii
2020-01-21 15:48   ` Eli Zaretskii
2020-01-22  5:13   ` Anand Tamariya
2020-01-22 17:25     ` Eli Zaretskii
2020-01-23  5:36       ` Anand Tamariya
2020-01-24  7:40         ` Eli Zaretskii [this message]
2020-01-24 16:15           ` Anand Tamariya
2020-01-24 16:20             ` Eli Zaretskii
2020-01-24 17:00               ` David Engster
2020-01-24 19:59                 ` Eli Zaretskii
2020-01-24 20:38                   ` David Engster
2020-01-28 15:50                     ` Anand Tamariya
2020-01-28 17:21                       ` David Engster
2020-01-28 17:50                         ` Eli Zaretskii
2020-01-29  5:14                         ` Anand Tamariya
2020-02-03  3:24                           ` Eric Ludlam
2020-01-28 19:43         ` Alan Mackenzie
2020-01-29  5:44           ` Anand Tamariya
2020-01-22  5:52 ` Anand Tamariya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83iml1s3od.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=atamariya@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.