emacs-devel
[Top][All Lists]
Advanced

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

Re: Filtering out process filters


From: Augusto Stoffel
Subject: Re: Filtering out process filters
Date: Fri, 06 Jun 2025 09:17:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Thu,  5 Jun 2025 at 01:09, Daniel Colascione wrote:

> Augusto Stoffel <arstoffel@gmail.com> writes:
>> Did you see my previous message, where I changed the benchmark to not
>> block the UI?  Benchmarks that do
>>
>>   (while (accept-process-output ...))
>>
>> on the main thread are not representative of the typical use cases.

> I tried your version in both interactively and in batch mode, on NS.
> Interactively, it didn't finish.  Profiling indicated ~100% of CPU time
> was spent on lock waits in ns_select and, on another thread, logging(!).
>
> In batch mode (I had Emacs join your thread), performance was the same
> as we've been discussing.  Same in -nw.  Something seems wrong with the
> NS event loop, but I think that's orthogonal to this discussion.

If you join the thread then the UI blocks, so one should indeed expect
the original behavior.

If you want to see how the ACF method influences the time spent on
redisplay then you need to really let the thread and the main loop run
freely.

Here's a modification of your script that does that.  You can run it
with

  emacs -Q -l buffer-vs-filter-nonblocking.el

and then wait for the messages to be printed (and optionally call M-x
profile-report afterwards).

Attachment: buffer-vs-filter-nonblocking.el
Description: Text document


reply via email to

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