Lua runtime optimizer + GC manager + loading helpers for WoW 3.3.5a
Author: Suprematist
LuaBoost is a WoW addon that improves addon-side runtime behavior with:
- smarter garbage collection
- shared utility APIs
- loading-screen event suppression
- lightweight diagnostics
- optional integration with
wow_optimize.dll
See what other players say: Reviews and Testimonials
- incremental per-frame GC
- different GC step sizes for normal, combat, idle, and loading
- emergency full GC when memory gets too high
- optional forced GC burst on certain heavy events
GetTimeCached()GetFrameNumber()LuaBoost_Throttle(id, interval)- reusable table pool
- cached date helper
- OnUpdate dispatcher API
- SpeedyLoad event suppression during loading screens
- safe and aggressive modes
- restore events after loading completes
/lb gc/lb pool/lb fps/lb events/lb memleak/lb updates
When wow_optimize.dll is loaded, LuaBoost can:
- detect DLL presence
- sync GC step settings to the DLL
- display DLL GC, fast path, and runtime state
Fixes from the review in #20, reported by Shandrax.
- MemUsage Min Interval now works - The slider was saved and shown but never read. When it is above 0 and "Block UpdateAddOnMemoryUsage()" is off, calls to
UpdateAddOnMemoryUsage()closer together than the interval are dropped. The default is now 0 (off), and a stored value of 1 from older versions is reset to 0 once, so nobody gets the hook switched on by the upgrade. Any value above 0 replaces a global function and can cause taint with ElvUI; the slider tooltip says so. - Error handler wrapping - If another addon chained to
geterrorhandler()after login, LuaBoost's wrappers nested and the inner one overwroteLUABOOST_LUA_ERROR_REPORTwith a stack taken from inside the handler chain. Only the outermost wrapper writes the report now. - ThrashGuard status - It reports active only when at least one StatusBar hook was installed. With zero hooks it stays inactive and
/lb tg togglesays so. - Combat text hook removed - The
CombatText_AddMessagede-duplication dropped identical messages for 0.5 s, and every duplicate refreshed the timer, so a steady stream of equal hits or heals showed only the first one. Combat text is left alone. LuaBoostC_IsLoaded()fallback - Without the DLL the Lua stub returnsfalseinstead oftrue. LuaBoost's own detection compares function identity and never used the return value.
- Table Pool Release Optimization — Optimized the
LuaBoost_ReleaseTablelogic by replacing the slow, manual key-clearing loop with a native C-levelwipe(t)call, eliminating table recycling overhead. - Dispatcher Safety Wrapper — Hardened the high-frequency
OnUpdatedispatcher against iterator invalidation by copying active callback handler keys to a temporary table before traversing. - Unified DLL Integration — Updated diagnostic displays and communication logic to seamlessly align with
wow_optimize.dllv3.16.0.
- aligns with the current
wow_optimize.dllv3.11.0 build, whose headline change is the mimalloc allocator redirect — WoW's entire static CRT heap is routed through mimalloc to fight 32-bit virtual-address fragmentation over long sessions and repeated alt-switches - GC control stays fully delegated to the DLL when it's present; LuaBoost remains a clean standalone fallback when it isn't
- DLL state display / diagnostics updated to match the current public feature set (event coalescing and the unit-API/spell/item caches are off in public-safe builds)
The addon and the DLL talk through Lua globals: LUABOOST_DLL_* written by the
DLL and LUABOOST_ADDON_* written by the addon. The shared globals were checked
against wow_optimize.dll v3.19.2, and LuaBoost 1.9.7 needed no change to
run with it.
The DLL does not register any LuaBoostC_* function. The addon defines Lua
stubs under those names, so LuaBoostC_IsLoaded() returns false, and
LuaBoostC_GCStep, LuaBoostC_GCCollect and LuaBoostC_SetCombat do nothing.
Two visible results: the DLL: line of /lb gc shows zeros and its UI cache
and fast path lines are omitted, because it reads those stubs; /lb reads the
globals and shows the DLL values. DLL detection uses the globals, not these
functions.
- adaptive GC (LuaBoost delegates GC stepping to the DLL when present, and
steps the collector itself while the DLL reports
LUABOOST_DLL_GC_ACTIVEasfalse) - mimalloc redirect of WoW's static CRT heap (VA-fragmentation defense)
- string table pre-sizing
- string.format and Lua library fast paths
- GetItemInfo result cache, on by default
- loading and runtime optimizations
- UI widget cache, disabled after addon regressions
- GetSpellInfo cache, removed: the function has no cacheable result
- Lua event coalescing, compiled out
LuaBoost does not print DLL API cache lines in its slash commands.
| Command | Description |
|---|---|
/lb |
Status overview |
/lb gc |
GC stats + DLL GC info |
/lb pool |
Table pool stats |
/lb toggle |
Enable/disable GC manager |
/lb force |
Force full GC |
/lb sl |
Toggle SpeedyLoad |
/lb sl safe |
SpeedyLoad safe mode |
/lb sl agg |
SpeedyLoad aggressive mode |
/lb tg |
ThrashGuard stats |
/lb tg toggle |
Toggle Lua-side ThrashGuard |
/lb tg reset |
Reset ThrashGuard counters |
/lb fps |
10-second FPS/frametime report |
/lb events |
10-second event frequency report |
/lb memleak |
30-second addon memory growth scan |
/lb updates |
Show registered update callbacks |
/lb settings |
Open Interface Options |
/lb help |
Show command list |
local now = GetTimeCached()
local frame = GetFrameNumber()if LuaBoost_Throttle("MyAddon_Update", 0.2) then
-- runs at most every 0.2 sec
endlocal t = LuaBoost_AcquireTable()
-- use table
LuaBoost_ReleaseTable(t)LuaBoost_RegisterUpdate("MyAddon_Update", 0.1, function(now, elapsed)
-- update logic
end)
LuaBoost_UnregisterUpdate("MyAddon_Update")Open: ESC → Interface → AddOns → LuaBoost
Panels:
- Main
- GC Settings
- Tools
Configurable options include:
- GC enable/disable
- preset selection
- per-mode GC step sizes
- emergency GC threshold
- idle timeout
- SpeedyLoad enable/mode
- debug output
| Preset | Normal | Combat | Idle | Loading | Emergency GC |
|---|---|---|---|---|---|
| Light | 20 KB | 5 KB | 80 KB | 150 KB | 150 MB |
| Standard | 50 KB | 15 KB | 150 KB | 300 KB | 300 MB |
| Heavy | 100 KB | 30 KB | 300 KB | 500 KB | 500 MB |
LuaBoost works with or without the DLL.
LuaBoost still provides:
- addon-side GC management
- table pool
- throttling
- loading helpers
- diagnostics
LuaBoost additionally becomes a control and visibility layer for:
- DLL GC mode and state
- DLL memory info
- Lua allocator status
- fast path stats
LuaBoost contains a Lua-side StatusBar-only ThrashGuard. When using current public DLL builds:
- the DLL UI widget cache is disabled
- LuaBoost ThrashGuard can still be used as a Lua-side option
- if you experience addon-specific frame issues, keep it off
Included locales:
enUSkoKRdeDEruRU
English is used as fallback for unsupported locales.
Does LuaBoost do anything without the DLL?
Yes. GC management, loading optimization, table pool, throttling, and diagnostics all work standalone.
Why don't I see API cache info anymore?
The current public DLL no longer exposes a meaningful public spell cache path. Slash command output was simplified.
Are there taint risks?
Most of LuaBoost is safe. Potentially risky options remain optional and disabled by default.
MIT License — use, modify, and distribute freely.
| Project | What it does |
|---|---|
| wow_optimize | Engine-level optimization DLL - allocator, Lua VM, timers, file I/O, frame-time benchmark |
| WA_SafeGuard | Backs up WeakAuras so a forced disconnect cannot wipe your auras |
| DefileAlert | Instant Defile target callout for the Lich King encounter |