emacs-devel
[Top][All Lists]
Advanced

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

Re: Filtering out process filters


From: Dmitry Gutov
Subject: Re: Filtering out process filters
Date: Fri, 6 Jun 2025 00:37:54 +0300
User-agent: Mozilla Thunderbird

On 05/06/2025 12:02, Eli Zaretskii wrote:

In batch mode, quite a lot of display stuff is bypassed entirely, and
the only frame we have there is 10x10, much smaller than anything in
interactive sessions.  That should account for some differences
between batch and TTY cases.

Depends on where the profile lands.

Sure, that's why I suggested 'perf'.  profiler.el is not accurate
enough, and cannot look inside C code.

It's as much profiler.c as it is profiler.el, so if someone wanted to add more visibility into native code, that should be possible.

2. Get rid of the bounce buffer by read(2)-ing read directly into the
buffer. Saves a memcpy.

Again, does memcpy take any significant percentage of CPU cycles?

Also, reading into the buffer will be less memory-efficient because
you don't know in advance how many bytes will be read, so we will
need to enlarge the gap by the value of read-process-output-max, which
could be large.

I also have a vague recollection that we already tried these
techniques, and decided against them.  Perhaps Dmitry remembers the
details.

We probably did not, and my intuition also is that we'll hit diminishing returns, if the scenario is improving a process as complex as Eglot/jsonrpc (and not just basic char-counting routine).

But it would be good to see someone try.



reply via email to

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