emacs-devel
[Top][All Lists]
Advanced

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

Re: interacting during (sit-for 0). Was: [PATCH] 5x speedup of flyspell-


From: Ilya Zakharevich
Subject: Re: interacting during (sit-for 0). Was: [PATCH] 5x speedup of flyspell-buffer
Date: Fri, 14 Apr 2023 18:51:31 -0700

On Thu, Apr 13, 2023 at 03:23:18AM -0700, Ilya Zakharevich wrote:
> P.S.  BTW, there is very little need to lock the UI.  On my (very old
>       and slow) system, these 10,000 misspellings are reported in 300ms
>       (even though aspell is cygwin — read “slow” — one).  After this
>       list of misspellings is swallowed, the rest of marking can be
>       done asynchronously, via timers.
> 
>       I may try to find more time to investigate (and maybe implement) this…

In fact, I think there is a much better way to work around this.

Suppose that a variable `recursive-edit-exit-on-idle' is supported by
the even loop.  Would then the following code implement
  (sit-for-0-interactively 'READ-ONLY)
correctly?

        (if (or unread-command-events unread-input-method-events 
unread-post-input-method-events)
;;;       (with-current-buffer flyspell-large-region-buffer
            (let ((buffer-read-only t) (inhibit-read-only nil)
                  (recursive-edit-exit-on-idle t))
              (condition-case nil
                  (recursive-edit)
                (error nil))));;;)

Thanks,
Ilya



reply via email to

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