Subject: 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 17:12:58 +0200

>> Please try with 'tooltip-reuse-hidden-frame' non-nil (there's nothing we
 >> can do about a session's first tooltip appearance, though).
 >
 > I'm not seeing a difference here.  I used this code to test:

Looks like a devastating bug in the GTK builds.  Can you try with the
attached patch?

Thanks, martin
diff --git a/src/xfns.c b/src/xfns.c
index a5431aa890..a8cdd66b57 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6748,7 +6748,8 @@ x_hide_tip (bool delete)

       /* Reset tip_last_frame, it will be reassigned when showing the
 	 next GTK+ system tooltip.  */
-      tip_last_frame = Qnil;
+      if (x_gtk_use_system_tooltips)
+	tip_last_frame = Qnil;

       /* Now look whether there's an Emacs tip around.  */
       if (FRAMEP (tip_frame))