emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Semantic font-lock for Java


From: Eli Zaretskii
Subject: Re: Semantic font-lock for Java
Date: Fri, 24 Jan 2020 09:40:18 +0200

> From: Anand Tamariya <address@hidden>
> Date: Thu, 23 Jan 2020 11:06:57 +0530
> Cc: address@hidden
> 
>  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 via email to

[Prev in Thread] Current Thread [Next in Thread]