help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Passing buffers to function in elisp


From: Michael Heerdegen
Subject: Re: [External] : Passing buffers to function in elisp
Date: Sat, 25 Feb 2023 19:31:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

<tomas@tuxteam.de> writes:

> > If `emms-info-native--read-and-decode-ogg-page' is called very often
> > (hundreds of times or more), it's probably better to use one single
> > buffer instead of a fresh temp buffer every single time.  Using temp
> > buffers creates quite a bunch of garbage IME.
>
> And then do (erase-buffer) then (insert-file-contents-literally)?

Yes.

I had a case in my own personal code where recycling temp buffers made a
big difference wrt garbage.  Not sure if the cases are comparable, but I
would give it a try.

Michael.




reply via email to

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