emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] EWW - use revert--buffer-function to reload, and allow reloa


From: Adam Porter
Subject: Re: [PATCH] EWW - use revert--buffer-function to reload, and allow reload in eww-list-buffer
Date: Mon, 14 Oct 2024 23:04:09 -0500
User-agent: Mozilla Thunderbird

On 10/14/24 21:39, Sebastián Monía wrote:
Adam Porter <adam@alphapapa.net> writes:

These sound a bit like micro-optimizations, how many eww buffers can
one
person have open that these speed differences would matter?

I'm sure that the difference would not be noticeable.  But when
committing new code, why not choose the most efficient implementation,
when the size and complexity of the source code is equivalent?  Over
30 or 40 years, little things add up.

And I was wrong, the difference doesn't depend only on the number of eww
buffers. The older version of eww-buffer-list' also used
with-current-buffer and it checked _all live buffers_.
That's potentially a lot more than only eww buffers.

Yeah, iterating over `buffer-list' should be done thoughtfully. :) It's also easy to overlook extra consing while doing so, e.g. doing a regexp match on each buffer's major-mode as a string (sometimes that seems unavoidable without, e.g. setting up a mode for all of a library's modes to inherit from so DERIVED-MODE-P could be used).

Thank you!

:)



reply via email to

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