File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,9 +229,22 @@ tabgrp:SetCallback(
229229tabgrp :SetFullWidth (true )
230230tabgrp :SetFullHeight (true )
231231
232- if cacheTabs [1 ] then
233- tabgrp :SelectTab (cacheTabs [1 ].value )
234- end
232+ -- Draw the tab's contents when the window is first SHOWN, not while the addon
233+ -- loads. SelectTab fires GUISelectCacheTab -> GUIDrawSpellCacheEditor, which
234+ -- builds two EditBoxes plus labels for EVERY cached spell. This frame starts
235+ -- hidden and most authors never open it, so doing that during the on-demand
236+ -- LoadAddOn (which is what opening the GSE menu triggers) stalled the client
237+ -- for seconds on a cache built up over years.
238+ local pendingInitialTab = cacheTabs [1 ] and cacheTabs [1 ].value
239+ cacheFrame .frame :HookScript (
240+ " OnShow" ,
241+ function ()
242+ if not pendingInitialTab then return end
243+ local tab = pendingInitialTab
244+ pendingInitialTab = nil
245+ tabgrp :SelectTab (tab )
246+ end
247+ )
235248cacheFrame :AddChild (tabgrp )
236249
237250if cacheFrame and cacheFrame .frame and GSE .RegisterUIScaleFrame then
You can’t perform that action at this time.
0 commit comments