emacs-devel
[Top][All Lists]
Advanced

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

Re: Sv: Emacs HTTP libraries [was: Re: How to contribute new package to


From: Eli Zaretskii
Subject: Re: Sv: Emacs HTTP libraries [was: Re: How to contribute new package to GNU ELPA?]
Date: Wed, 31 Mar 2021 09:22:37 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Tue, 30 Mar 2021 21:08:43 -0400
> 
> > Not if you turn off garbage collection, indeed (except for the fact that you
> > pay for it later on), but wouldn't a native library remove that GC pressure?
> 
> Not clear.  There's a good chance that the GC pressure is due to the
> strings generated and passed to the process filter and then inserted in
> a temp buffer.
> 
> So there's a chance that even going through a super-efficient C library,
> as long as the end result is returned via output sent to a process
> filter for insertion into a temp buffer the result won't necessarily be
> much better.

We could add a special kind of filter that puts the text directly into
a buffer, without going through a string.  In that special filter, we
could make arrangements to preallocate a large enough gap for that
buffer, so that repeated reallocations won't get in the way, either.
Then GC won't be a problem even when doing this entirely in Emacs
code.

But I think this all is premature optimization.  We have only one
synthetic use case; we should base our design decisions on more solid
grounds, after looking into more uses and analyzing the reason(s) for
the slowness.



reply via email to

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