Skip to content
suprepuprePublic

About

Lua-side companion for WoW 3.3.5a: garbage collection control, loading-screen event suppression, and shared APIs for addon authors. Works standalone or alongside wow_optimize.

Topics

Resources

Stars

56 stars

Watchers

4 watching

Forks

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

LuaBoost

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

Reviews

See what other players say: Reviews and Testimonials


Main Features

Smart GC Manager

  • 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

Runtime Utilities

  • GetTimeCached()
  • GetFrameNumber()
  • LuaBoost_Throttle(id, interval)
  • reusable table pool
  • cached date helper
  • OnUpdate dispatcher API

Loading-Screen Helpers

  • SpeedyLoad event suppression during loading screens
  • safe and aggressive modes
  • restore events after loading completes

Diagnostics

  • /lb gc
  • /lb pool
  • /lb fps
  • /lb events
  • /lb memleak
  • /lb updates

DLL Integration

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

What's New in v1.9.8

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 overwrote LUABOOST_LUA_ERROR_REPORT with 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 toggle says so.
  • Combat text hook removed - The CombatText_AddMessage de-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 returns false instead of true. LuaBoost's own detection compares function identity and never used the return value.

What's New in v1.9.7

  • Table Pool Release Optimization — Optimized the LuaBoost_ReleaseTable logic by replacing the slow, manual key-clearing loop with a native C-level wipe(t) call, eliminating table recycling overhead.
  • Dispatcher Safety Wrapper — Hardened the high-frequency OnUpdate dispatcher 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.dll v3.16.0.

What's New in v1.9.6

  • aligns with the current wow_optimize.dll v3.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)

Current Public Integration Model

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.

Public DLL features still relevant to LuaBoost

  • adaptive GC (LuaBoost delegates GC stepping to the DLL when present, and steps the collector itself while the DLL reports LUABOOST_DLL_GC_ACTIVE as false)
  • 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

Not in the public DLL

  • 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.


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

Runtime APIs Exposed For Addons

Cached Time

local now = GetTimeCached()
local frame = GetFrameNumber()

Shared Throttle

if LuaBoost_Throttle("MyAddon_Update", 0.2) then
    -- runs at most every 0.2 sec
end

Table Pool

local t = LuaBoost_AcquireTable()
-- use table
LuaBoost_ReleaseTable(t)

OnUpdate Dispatcher

LuaBoost_RegisterUpdate("MyAddon_Update", 0.1, function(now, elapsed)
    -- update logic
end)

LuaBoost_UnregisterUpdate("MyAddon_Update")

Settings

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

Presets

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

wow_optimize Integration

LuaBoost works with or without the DLL.

Without DLL

LuaBoost still provides:

  • addon-side GC management
  • table pool
  • throttling
  • loading helpers
  • diagnostics

With DLL

LuaBoost additionally becomes a control and visibility layer for:

  • DLL GC mode and state
  • DLL memory info
  • Lua allocator status
  • fast path stats

Notes About ThrashGuard

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


Localization

Included locales:

  • enUS
  • koKR
  • deDE
  • ruRU

English is used as fallback for unsupported locales.


Troubleshooting

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.


License

MIT License — use, modify, and distribute freely.


Also for WoW 3.3.5a

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

About

Lua-side companion for WoW 3.3.5a: garbage collection control, loading-screen event suppression, and shared APIs for addon authors. Works standalone or alongside wow_optimize.

Topics

Resources

Stars

56 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages