emacs-devel
[Top][All Lists]
Advanced

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

Re: Redisplay slower in Emacs 28 than Emacs 27


From: Lars Ingebrigtsen
Subject: Re: Redisplay slower in Emacs 28 than Emacs 27
Date: Tue, 08 Dec 2020 18:29:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> So moving to Fequal is fine if we decide to have the Emacs 27 caching
>> semantics.
>> 
>> However, if we move to EQ semantics, the real speedup is that we don't
>> have to call sxhash(img) on all the images -- and that's a slow
>> operation, because it'll call hash_string on all the string contents,
>> and if you have a large :data image, it'll compute that every time Emacs
>> decides to redisplay that image.
>
> I don't think I follow: since an image spec can (and usually does)
> include a file name, how can we use EQ?  That would mean identical
> file names will cause us to think an image isn't cached, right?  Or
> what am I missing?

I'm not sure -- I don't quite understand what you mean here.

Here's a spec:

(setq spec '(image :type "xpm" :file "/tmp/foo.xpm"))

Every time spec `spec' is redisplayed, EQ (spec, spec) will be true.
We'd be going by "object identity" of the spec, and not looking at the
contents at all.

I.e., we'd start treating image specs as (immutable) objects (to make
redisplay more efficient).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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