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

From: martin rudalics <[email-masked]>
Date: Tue, 12 May 2020 19:42:52 +0200

> Indeed, with tooltip-reuse-hidden-frame t and your patch, creating a
 >  tooltip is instantaneous (after the first tooltip is created)

Eli, any problems to fix this in Emacs 27?

 > The docstring suggests that with this option, results won't always be
 > correct.  Is there a chance that we could rebuild the frame when
 > needed and then make that option the default?

It depends on what "when needed" stands for.  Basically, the results may
be incorrect when some sort of face change happens.  But, as I recently
mentioned in another thread, the code not reusing a hidden frame already
fails picking up an internal border face specified via

   (set-face-background 'internal-border "red")

so such annoyances are already present in the default code.

In principle, you can always add or remove some non-position-specifying
alist entry and the tooltip frame will be recreated from scratch.  So if
we can identify the "when needed", it should be easy to add such an
entry and remove it as soon as the next tooltip frame has been created.

martin