From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Redisplay slower in Emacs 28 than Emacs 27 Date: Mon, 07 Dec 2020 23:32:50 +0100 Message-ID: <87v9dd5jsd.fsf@gnus.org> References: <877dptfvae.fsf@gnus.org> <83czzl8qwu.fsf@gnu.org> <87sg8h78s8.fsf@gnus.org> <87h7ox71xc.fsf@gnus.org> <874kkx6zwj.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27469"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Gregory Heytings , Eli Zaretskii , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 07 23:34:26 2020 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 1kmP5M-0006zI-J0 for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Dec 2020 23:34:24 +0100 Original-Received: from localhost ([::1]:44626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmP5L-00020Q-HL for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Dec 2020 17:34:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmP4B-00016E-3K for emacs-devel@gnu.org; Mon, 07 Dec 2020 17:33:11 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:60880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmP47-0000zd-3b; Mon, 07 Dec 2020 17:33:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qg3yNTn/ONA8dxolv/Skx2+6pCwJjhPuVIT641SmdtY=; b=l2DtiDCFd1dxyyPaGvsKa72+4Y oyNaPD0SA2VdEqc54nJcDwU/i2UZDjhpd9YFEHjBpSUODoaVPv7d/F7ta/omMZXjqH3thmMfb5v49 Pu1CAFCaVWru017QbbVXpX7IWVbkfHJRFe3aPOaLui1pJGkUfMk1qixs1a3TiXZ6BS68=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmP3r-0002Xx-Qb; Mon, 07 Dec 2020 23:33:02 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUnOIxpZGiik0cu QkGRcTBfWCuQipn////0LwWVAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QMBxYJEM34UmMAAAGmSURB VDjL3ZLbkSMhDEVxBsPYzb+pngCmZAUwXgigjRQAP+Qfwl7xsD1VG8Gq3W24B0kI5Nz/bf7f8meM 7kz0Lp38hztBT45gftrHyX/+HD7GuA9Ap66fvZcvEegxdaBavqFjUOS49/UGuCjs8EjGWGNAUlan GbIIvsP3MRySkyyZIbMB4hTvXd8dj0BetECf27v0HHO8A8i1j4OBMqs4cyG+X18eqtOdhG77tb6D Wrv7Xm4JIPjqZQLva/ObGhjej155aDXU1rZcHmmGVdEOWvMA6Y/qNXgLgKqxXQOwzQqaoUTVZRl6 O/8C4lIKT5DzBGoeCrEGy5GeHgiL7Q6HsCHwKvaSo9O+qxaaRT78u8fMgSktgJt5hrJz/F5dsefi pCzdP1mNmVaOLkMlvKFZs7HWYJmPjUwct4M7c/eIerCLUnqH0aFkh0PWV9ZAJg9UyM7GTte6iabZ SBcoeHjoN+hsnVbs2E1lthya0F7aO5NHUwMofheB+FVsogPwiLuNvz51I+XSzMpMPhbM6cuc7b6P Uv/K+jpe4M3yCKWMxUxFmZaK9y/k9ctSdr/JEgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMi0w N1QyMjowOToxNiswMDowMDLrzLgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTItMDdUMjI6MDk6 MTYrMDA6MDBDtnQEAAAAAElFTkSuQmCC X-Now-Playing: Shopping's _All Or Nothing_: "Body Clock" In-Reply-To: (Alan Third's message of "Mon, 7 Dec 2020 22:23:35 +0000") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:260531 Archived-At: Alan Third writes: > I think the image cache is actually broken. > > If we have two image specs that have the same contents, but don't have > identical memory locations, surely we still want the cache to work? We used to use Fequal on the spec, so that used to work. I thought the point of the equal_lists function was to speed that up a bit, by dropping that generality and just using EQ instead? But it does indeed mean that you have to be more careful with how you construct the image specs, and I think that's a fair tradeoff. It works for the vast majority of the use cases, but as we saw here, the toolbar code hadn't been adjusted, but that's easily fixed (see the patch I posted earlier). Especially with huge :data images, the equal_lists code should be faster than the Fequal code, I think? On the other hand, when we're constructing the hashes, we iterate over a lot of data anyway, so... > For example when playing an animated gif image.el doesn't store the > image specs for each frame, it generates them on the fly by > incrementing the frame counter. I can see that Emacs creates a new > cache entry for every frame every time the gif is played through. > > That means it must be decoding every frame every time. Yes, I think so. I think there's at least one open bug report about making animated gifs faster (because they're really slow now). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no