> I suppose most of the overhead goes to x_create_tip_frame - a normal > `make-frame' here gets me "cons: 37464 vector: 33018". Calculating the > tooltip position doesn't seem to add much overhead. So the only way to > fix this is to hide tooltip frames instead of deleting and re-creating > them. If this can be done properly. I now tweaked the code to do that. If nobody objects I intend to apply the attached patch in the next days. Optionally reuse tooltip frames instead of deleting/recreating them. * src/frame.c (tooltip_reuse_hidden_frame): New option. * src/w32fns.c (x_create_tip_frame): Remove argument TEXT. Fix handling of dividers. (x_hide_tip): New function. (Fx_show_tip): Try to reuse old tooltip frame when `tooltip-reuse-hidden-frame' is non-nil and frame parameters have not changed. Insert STRING here instead of passing it to x_create_tip_frame. Compute size of tooltip window with Fwindow_text_pixel_size. Obey Vw32_tooltip_extra_pixels when padding tooltip window. (Fx_hide_tip): Call x_hide_tip. (Vw32_tooltip_extra_pixels): New variable. * src/xdisp.c (Fwindow_text_pixel_size): Don't return negative y value. Fix doc-string. * src/xfns.c (x_create_tip_frame): Remove argument TEXT. Call make_frame with mini_p argument false. (x_hide_tip): New function. (Fx_show_tip): Try to reuse old tooltip frame when `tooltip-reuse-hidden-frame' is non-nil and frame parameters have not changed. Insert STRING here instead of passing it to x_create_tip_frame. Compute size of tooltip window with Fwindow_text_pixel_size. Obey Vw32_tooltip_extra_pixels when padding tooltip window. (Fx_hide_tip): Call x_hide_tip. * lisp/cus-start.el (tooltip-reuse-hidden-frame): Add customization entry. martin