emacs-devel
[Top][All Lists]
Advanced

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

Re: Filtering out process filters


From: Eli Zaretskii
Subject: Re: Filtering out process filters
Date: Wed, 04 Jun 2025 14:18:39 +0300

> Date: Wed, 4 Jun 2025 05:41:17 +0300
> Cc: arstoffel@gmail.com, emacs-devel@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 03/06/2025 23:58, Daniel Colascione wrote:
> > Default gc size for all of these.
> > 
> > Baseline (batch):
> > 
> > buffer+acf: 5037 MB/s
> > term: 314 MB/s
> > jsonrpc: 577 MB/s
> > 
> > NS -nw:
> > 
> > buffer+acf: 5046 MB/s
> > term: 108 MB/s
> > jsonrpc: 208 MB/s
> > 
> > NS:
> > 
> > buffer+acf: 1353 MB/s
> > term: 93 MB/s
> > jsonrpc: 149 MB/s
> > 
> > The NS slowness persists if I set mode-line-format (both locally and
> > globally) to "".
> > 
> > At least for me, the rank order of buffer+acf
> > vs. filters persists, but GUI Emacs is just much slower for some reason.
> > ns_select does a bunch of random things I haven't totally grokked, but
> > it shouldn't be_that_ bad.
> 
> I'm seeing similar with the GNU/Linux build, so it's not just NS:
> 
> batch:
> 
> buffer+acf: 2741 MB/s
> term: 87 MB/s
> jsonrpc: 139 MB/s
> 
> nw:
> 
> buffer+acf: 2556 MB/s
> term: 57 MB/s
> jsonrpc: 94 MB/s
> 
> gui:
> 
> buffer+acf: 2036 MB/s
> term: 55 MB/s
> jsonrpc: 97 MB/s
> 
> That's with the default gc-cons-threshold.
> 
> The specific numbers seem to fluctuate. The buffer/filter ratio seems 
> sharper than in your results, though.
> 
> With 10GB, it's like this:
> 
> batch:
> 
> buffer+acf: 2689 MB/s
> term: 172 MB/s
> jsonrpc: 921 MB/s
> 
> nw:
> 
> buffer+acf: 2615 MB/s
> term: 232 MB/s
> jsonrpc: 885 MB/s
> 
> gui:
> 
> buffer+acf: 2132 MB/s
> term: 140 MB/s
> jsonrpc: 715 MB/s

If we want to look into the reasons seriously, these 3 cases should be
profiled, preferably with 'perf', and we should examine the profiles.

My conclusions from the numbers are that the significant differences
between GUI and TTY sessions happen only on NS, which is a known
outlier wrt both ns_select and redisplay.  On GNU/Linux, according to
Dmitry's numbers, the only significant difference I see is for 'term'
(which perhaps shouldn't surprise, since 'term' is all about display,
which is more expensive in GUI mode due top fonts and stuff; but
that's a speculation ATM).

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.

Btw, I still don't have a clear idea why the ACF method is so much
faster, since it basically does the same stuff.  The only two
significant factors I'm aware of are consing of strings and decoding.
The latter we could perhaps disable in the other two methods, so we'd
see the effect of consing strings alone.  Again, an accurate profile
should probably answer these questions better and more clearly.



reply via email to

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