Subject: Re: bug#41200: Displaying a tooltip with x-show-tip gets very slow as more faces are defined

From: Clément Pit-Claudel <[email-masked]>
Date: Fri, 15 May 2020 15:23:00 -0400

On 15/05/2020 15.05, Eli Zaretskii wrote:
>> Cc: [email-masked], Juri Linkov <[email-masked]>
>> From: Clément Pit-Claudel <[email-masked]>
>> Date: Fri, 15 May 2020 14:50:17 -0400
>>
>>>>> No, I was asking why not start with it as nil and actually make a
>>>>> hash-table when we first need it.
>>>>
>>>> Oh, I thought it would be simpler to always have a hash table instead of having to sanity check every time.
>>>
>>> What is the default size of a hash-table?
>>
>> 65 entries, I think.
> 
> The number of basic faces is just 18.  Is 65 a good initial size for
> that?

I think that map stores more than just the basic faces: in fact, $ emacs -Q --batch --eval '(print (length (frame-face-alist)))' prints 100, so maybe I should even make the map larger by default?

Clément.