emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] 5x speedup of flyspell-buffer


From: Eli Zaretskii
Subject: Re: [PATCH] 5x speedup of flyspell-buffer
Date: Fri, 14 Apr 2023 08:47:46 +0300

> Date: Thu, 13 Apr 2023 13:29:33 -0700
> From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
> Cc: emacs-devel@gnu.org
> 
> On Thu, Apr 13, 2023 at 01:32:11PM +0300, Eli Zaretskii wrote:
> > > Without profiling, how to find out “how much overhead is tolerable to
> > > the user”?!
> > 
> > Since you say the change you propose speeds up by a factor of 5, just
> > setting N = 5 should do approximately the same, no?  I'd actually go
> > with N = 10 for a good measure.
> 
> Nope.  My solution decreases THE OVERHEAD 50 times.  This SPEEDS UP
> the whole brouhaha ∼5x (since the overhead was 4x). 

OK, then N = 50 should do the same trick.

> > If you intend to do this asynchronously, I think a relevant question
> > is why would you need to do that for the entire buffer?  When doing
> > this synchronously, the answer is clear, but doing it asynchronously
> > means you don't really care when will it end.  So in that case,
> > perhaps a better idea would be to spell-check only the stuff in the
> > window, and update that as the window is scrolled to expose more of
> > the text, like jit-lock.el does for fontifications?
> 
> The simple answer: this does not work.
> 
> Observe “how well implemented” it is now — after decades of many
> people trying!  (I have seen something like tens of discussions of
> people attempting something like this.  The latest attempt I have seen
> uses POLLING!)

It does work here and elsewhere.  But suit yourself.



reply via email to

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