From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] EWW - use revert--buffer-function to reload, and allow reload in eww-list-buffer Date: Mon, 14 Oct 2024 19:08:03 -0500 Message-ID: <3cff8953-ad69-43ef-b1ab-90d80e9d5f5f@alphapapa.net> References: <86y12tycdy.fsf@gnu.org> <87v7xvh4rd.fsf@sebasmonia.com> <63628e6e-9365-40da-bb20-2e5be99c71b4@alphapapa.net> <87o73ngwfk.fsf@sebasmonia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20707"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , jporterbugs@gmail.com, emacs-devel@gnu.org To: =?UTF-8?B?U2ViYXN0acOhbiBNb27DrWE=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 15 02:09:00 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t0V7T-0005DZ-L5 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Oct 2024 02:08:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0V6o-0005Zb-KY; Mon, 14 Oct 2024 20:08:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0V6m-0005ZI-Q8 for emacs-devel@gnu.org; Mon, 14 Oct 2024 20:08:16 -0400 Original-Received: from bongo.aspen.relay.mailchannels.net ([23.83.221.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0V6k-0002zl-Nj; Mon, 14 Oct 2024 20:08:16 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D97C4165DFA; Tue, 15 Oct 2024 00:08:10 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a280.dreamhost.com (100-101-172-251.trex-nlb.outbound.svc.cluster.local [100.101.172.251]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 64F8F165FDC; Tue, 15 Oct 2024 00:08:10 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1728950890; a=rsa-sha256; cv=none; b=lN5aE5NAu9MDkLaQkkeMk4fXRPaKAyYoiKkJ30xqwcDkzbetYtJNgv+Zd7TTPzTMtFRQsP aN05r94cc9rD18qveflpsPBuA7sNNCIy6s6ua7O8VGEMnKM5cEdfuUe3yY+FEHExwomb/+ oa/g5+iYrZoubswS8giPpSrscCMql6MXBGhMM9DvChdEGYf+dxN1jaeTjTodbFhnO3/tRV uqPBiTMWUfG9OcoUXrysQt9IbJbyPOYVf3uScTOvRt5Yz/fK26njhawEwQs/TP1UhgH2h9 CDLVEwUUxSzzq03hLMt6/LZ2WbqBFuZO8GzKZJjTvKf6WHF509Auo43CFy7eug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1728950890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sk9AAlAa2UVLLb2bSb/pthv1u3R7w2LJsouswUTH9eg=; b=Yau9C25laq7e1leZSkO0PK/J2sjUjGynNM2Badwk60DJJVgW8B1hP1yydyAbp5K4bvckB+ cM8XTZe/JNofjvYCkIYEF0IwEXdtg+7FHawWkyqpyrGp++TAlrDUsIx41du8ZfjmjtwK0J Jptg6J9Zi8aKqVkG3yjZQzodAM+Mg0ectLYEF1f39mE/Ty1wEAjJBZ8L5p7CBHYZmXgeBY 5dGdhDP/D5Tf+qdGTKnQ4tB2jNRKj3CgXKfMtUNB+7xzW/ThFfanMPMJF0PBpy1DjL+WOR zn37TryYKXR+apaACjf3lzZ3/7XeZQjKXy224GdRMtDEZWImvSBNOW9lKRl0KQ== ARC-Authentication-Results: i=1; rspamd-6b8cf4b767-sqqgs; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Bottle-Bottle: 40e6aae568b29ec6_1728950890643_2120893880 X-MC-Loop-Signature: 1728950890643:372767854 X-MC-Ingress-Time: 1728950890643 Original-Received: from pdx1-sub0-mail-a280.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.101.172.251 (trex/7.0.2); Tue, 15 Oct 2024 00:08:10 +0000 Original-Received: from [10.157.64.69] (unknown [45.130.83.59]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a280.dreamhost.com (Postfix) with ESMTPSA id 4XSDvY4X9Cz68; Mon, 14 Oct 2024 17:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1728950890; bh=sk9AAlAa2UVLLb2bSb/pthv1u3R7w2LJsouswUTH9eg=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=zNScLtey8HaDwlQoNZzyIn4Ct/RtwjYKuyzypA5py+7DTbROirChYrWnBn0Er9tWW 7XpfEAoRWyDkMDmpMnFpspdJvDDO7024KbeicwoJudOEeX2uixMpt1XSnOJh3RR1CA StRCGSKi2SYSysz4bqcgj5a26G3Z2EBWtr5I+7dRGjudRRWCbrEx2/YRjx1Kxd+avP WKIpP1QpukYCpLu2gt5hhxGqdZihn+KmCwvDytf1y/CQw38GAwuoWtQYLPJNMWt4YB Bxb0M/+eo7M6WP5zkNayzU6okKDp1HTiMmk1uDhV7EAYO0zIRWbeS4yuSF5RL6rIhq ZiRnOwVbweCHg== Content-Language: en-US In-Reply-To: <87o73ngwfk.fsf@sebasmonia.com> Received-SPF: neutral client-ip=23.83.221.21; envelope-from=adam@alphapapa.net; helo=bongo.aspen.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324576 Archived-At: On 10/13/24 23:06, Sebastián Monía wrote: > > Hello! > > Adam Porter writes: >> Small suggestion: When possible, using BUFFER-LOCAL-VALUE is >> preferable over WITH-CURRENT-BUFFER, as it's significantly faster (in >> my testing). You could do this in `eww--list-buffers-get-data'. >> >> Also, you might want to disable the undo list in the list buffer to >> save memory, since there's no need to undo in that buffer. >> >> Finally, in `eww-buffer-list', you could use `match-buffers' instead >> of a bespoke loop. >> >> Thanks for working on this. >> >> --Adam > > First, thank you, as I wasn't aware of buffer-local-value nor > match-buffers! > > 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.