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: Wed, 22 Jan 2020 19:25:36 +0200

> From: Anand Tamariya <address@hidden>
> Date: Wed, 22 Jan 2020 10:43:21 +0530
> Cc: address@hidden
> 
>  This seems to be a complete forked repository.  Is it possible to show
>  a patch relative to the current master?
> 
> https://gitlab.com/atamariya/emacs/compare/v0.5...dev

Thanks.

> Most relevant changes are in lisp/cedet/semantic/java.el . Other minor 
> changes are for disabling jit-lock.
> - Font lock setup : semantic-font-lock-mode()
> - Fontify region function: extract()
> - Helper function: semantic-fontify-tag()

I don't think I understand the reasons for the changes in font-lock.el
and cc-mode.el.  Can you explain?

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?

>  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.
> 
> Not sure how to do this. If you can help me with steps, I can collect the 
> data. 

I find this function useful:

  (defun scroll-up-benchmark ()
    (interactive)
    (let ((oldgc gcs-done)
          (oldtime (float-time)))
      (condition-case nil (while t (scroll-up) (redisplay))
        (error (message "GCs: %d Elapsed time: %f seconds"
                        (- gcs-done oldgc) (- (float-time) oldtime))))))

Run it after loading a file, and look at the times with the default
font-lock and with your modifications.



reply via email to

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