2012/10/4 Thu 15:13:56 UTC+9 Arseny Kapoulkine:
> gui_mch_update_tabline in Windows gvim is quadratic in the number of tabs. This happens because the entire control is redrawn after every InsertItem/SetItem/DeleteItem message. The delay starts to get *really* noticeable at 60 open tabs or so (Windows 7).
>
> Note that disabling redraws during the update is not enough - the code used GetTabItemRect to check if the item is present; however, this forces the tab control to recompute the layout after every change, which still results in quadratic behavior.
>
> The attached patch fixes the issue.
After applying your patch, the variable rc is no more used in
the function gui_mch_update_tabline().
diff --git a/src/gui_w48.c b/src/gui_w48.c
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -2446,7 +2446,6 @@
TCITEM tie;
int nr = 0;
int curtabidx = 0;
- RECT rc;
#ifdef FEAT_MBYTE
static int use_unicode = FALSE;
int uu;
Thanks,
Ken Takata