github suprepupre/wow-optimize v2.0.3
v2.0.3 — UI Widget Cache Fix

latest releases: v3.5.14, v3.5.13, v3.5.11...
one month ago

🐛 Critical Bugfix

UI Widget Cache was not working (0% skip rate → 68%+ skip rate)

The UI cache had 10 hooks installed and reported [ OK ] in logs, but every single call was passed through — zero skips. The widget identity function silently returned NULL for all widgets.

Root cause: GetWidgetIdentity() used two approaches that both failed:

  1. WoW's internal token/object system (api_getcurrentobject) — tokens were stale or semantically wrong
  2. lua_touserdata / lua_topointer fallback — the address used for lua_topointer was actually lua_tothread, so it returned NULL for frame tables

Fix: Rewrote widget identity to read directly from the Lua stack:

L->base[0].gc  →  GCObject* (= Table* for WoW frames)

This pointer is stable, unique per widget, and works for all frame types (FontString, StatusBar, Texture, Region).

Results

Before After
UI Cache: 0% skip UI Cache: 68% skip
All calls passed through 2/3 of redundant UI updates eliminated

What this means for gameplay

  • Smoother UI in raids and crowded areas — addons that update health bars, cast bars, nameplates 60x/sec now skip redundant engine calls
  • Lower CPU usage from UI rendering — especially with unit frame addons (oUF, Grid2, Pitbull, ElvUI)
  • More stable frame times — fewer spikes from redundant SetText, SetValue, SetStatusBarColor calls

Other fixes

  • Fixed version.rc syntax error (ENDdEND)
  • Removed diagnostic logging from production build

Full Changelog

v2.0.2...v2.0.3

Don't miss a new wow-optimize release

NewReleases is sending notifications on new releases.