OmniFlow (LibOmniFlow-1.0) — The Zero-Spike Timing Wheel, Adaptive Coroutine, Async/Await & C++-Filtered Event Engine
What OmniFlow Does: OmniFlow (LibOmniFlow-1.0) is a high-performance, zero-dependency timer wheel, C_AddOnProfiler-guided coroutine scheduler, structured Async/Await promise + singleflight loader, and C++-filtered smart event bus (with a 4-tab Diagnostic & Benchmark Studio at /of) for Retail / Midnight (11.x–12.x), WoW Forever (1.60.1), and all Classic flavors. Built to replace the legacy timer, event, bucket, and background-task stack — AceTimer-3.0, AceEvent-3.0, AceBucket-3.0, CallbackHandler-1.0, LibAsync, and ad-hoc OnUpdate polling loops — with real C++ engine primitives and strict Lua 5.1 zero-churn pooling.
Addon Authors: Upgrade Your Existing Addon in 1 Click (Zero Handler Rewrites)
1-Click Web Converter Studio: https://fishingbuddyforever.com/Omniflow | Offline Kit: OmniFlow-Developer-Kit.zip
You do not need to rewrite your timers, event handlers, buckets, or coroutines to upgrade an existing addon to OmniFlow:
- Browser
.zip& Folder Converter (HybridorBridgemode): Drag & drop your addon.zipor folder at fishingbuddyforever.com/Omniflow to preview unified diffs in-browser. Strips legacyAceTimer-3.0,AceEvent-3.0, andAceBucket-3.0mixins fromNewAddon, routesLibStub+LibAsynccalls through dual-compatOmniFlow_Bridge.lua(v1.0.4+,v1.0.0–v1.0.3, and pure-Lua fallback), leaves vendoredLibs/and siblingOmni*bridges untouched, enforces## Dependencies: OmniFlow, and generates an optionalOmniFlow_Tasks.luablueprint (OnPlayerUnitEvent,ForRange,Singleflight,DeferOutOfCombat). - Built-In
v1.0.4+1-Line Drop-In API (EmbedAceFlow): CallLibStub("LibOmniFlow-1.0"):EmbedAceFlow(MyAddon)(or:CreateLegacyBridge()) for instantO(1)timing wheel, ZeroSpike DRR coroutines, C++RegisterUnitEventsharding, and Midnight Secret-Value-safe buckets. - Offline Python CLI, In-Game Studio & AI Agent Skill: Download
OmniFlow-Developer-Kit.zipand runmigrate_to_omniflow.py --mode hybrid, type/of convert(or clickAddon Authors: 1-Click Converterinside/of), or dropSKILL.md/MIGRATE_PROMPT.mdinto Cursor, Claude Code, Codex, or Antigravity. - License & CurseForge Required Dependency Policy (
All Rights Reserved): OmniFlow is proprietary and non-embeddable — third-party addon makers may not bundleLibOmniFlow-1.0files and must list standalone OmniFlow as a Required Dependency on CurseForge (under Project/File Relations) in addition to## Dependencies: OmniFlowin their.toc.
How Big of an Improvement Is OmniFlow?
Benchmarked head-to-head (median of 5 rounds) directly against verbatimAceTimer-3.0+AceEvent-3.0+AceBucket-3.0+CallbackHandler-1.0, OmniFlow eliminates 99.97% of timer GC allocation churn (3,359× less heap across10,000concurrent one-shot timers:1.67 KBpeak,10,000pool hits, and0C_Timers in20.81 msvs.5,621.95 KB,10,000C_Timers, and22.20 ms), speeds up multi-addonCancelAllteardown by 1.68× with zero leakedC_Timers, cuts 200 repeating ticker CPU by 1.98× (10.5× less memory & 2.7× lower single-frame spikes), cuts 40-player raidUNIT_AURACPU by 4.19× with 40× fewer Lua calls via 4-unit C++RegisterUnitEventshards, runs10,000-eventBucketbursts faster while shielding 100% of Midnight (12.0+) Secret Values (0errors vs.100/100crashes inAceBucket-3.0), reduces heavy 300k-row combat scan frame peaks by 28.4× (0.45 msmax slice vs.12.71 msfreeze), deduplicates concurrent cold asset lookups by 98% (1request instead of50), and sleeps at 0 idleOnUpdateCPU.
Head-to-Head Benchmark: Verbatim Ace3 Stack vs. OmniFlow (v1.0.1)
Every frame stall and memory spike in crowded hubs, Mythic+ pulls, and 40-player raids traces back to the same 2009 patterns: allocating fresh closure tables per timer, waking dozens of Lua handlers on every raid unit aura change, crashing or tainting on Midnight Secret Values, hammering server asset caches repeatedly, and spinning hidden OnUpdate frames forever. OmniFlow eliminates every one of those bottlenecks:
| Workload / Capability | Legacy Baseline (Verbatim Ace3 / Unbudgeted / OnUpdate) |
OmniFlow (LibOmniFlow-1.0) |
Measured Improvement (Median of 5) |
|---|---|---|---|
| 10,000 Concurrent One-Shot Timers (Schedule + Fire + GC) | AceTimer-3.0: 22.20 ms (8.12 ms sched), 5,621.95 KB peak (494.81 KB retained), 10,000 C_Timers |
4-Level Hashed Wheel + Pooled 43-Bit Handles: 20.81 ms (7.11 ms sched), 1.67 KB peak, 10,000 pool hits, 0 C_Timers |
-99.97% GC churn (3,359× less heap) · Faster CPU · 0 C_Timers |
5,000 Active Timers Multi-Addon CancelAll (20×250) |
AceTimer-3.0: 2.66 ms teardown, 5,000 stranded C_Timer.After closures |
O(clientTimers) Intrusive Unlink: 1.59 ms, 0 stranded C_Timers |
1.68× faster teardown · 0 leaked C++ timers |
| 200 Repeating 1.0s Tickers (10s @ 60 FPS = 600 frames) | AceTimer-3.0: 3.41 ms CPU, 253.19 KB churn, 200 callbacks on 1 frame |
Coarse 62.5 ms Phase-Jitter Staggering: 1.72 ms CPU, 24.10 KB churn, 74 max callbacks/frame |
1.98× faster CPU · 10.5× less mem · 2.7× lower spike |
40-Player Raid UNIT_AURA (4,000 Events × 8 Modules) |
AceEvent-3.0 + CBH-1.0: 5.44 ms CPU, 32,000 Lua handler calls |
4-Unit C++ RegisterUnitEvent Shards: 1.30 ms CPU, 800 Lua calls (3,900 C++-dropped) |
4.19× faster CPU · 40× fewer Lua calls (-97.5%) |
10,000 BAG_UPDATE Burst + 100 Midnight Secret Values |
AceBucket-3.0: 4.42 ms CPU, 100/100 Lua crashes (AceBucket-3.0.lua:108) |
SecretGuard + O(1) Window Coalescer: 4.21 ms CPU, 0/100 errors (100 shielded) |
Faster burst CPU · 100% crash-proof in Midnight combat |
| Heavy 300,000-Row Combat Scan (120 FPS in Combat) | Unbudgeted Loop: 12.71 ms single-frame freeze (Over5Ms = 1) |
C_AddOnProfiler ZeroSpike ForRange: 0.45 ms max slice across 93 frames (Over5Ms = 0) |
28.4× lower peak frame time · 0 spikes > 5 ms |
Concurrent Cold Item / Spell Lookups (50× AwaitItem) |
Naive Listeners: 50 C++ load requests + Classic Era spell failure hangs |
Singleflight Deduplication + Failure Rejection: 1 C++ request (49 saved, 50/50 resolved) |
-98% C++ load requests (1 vs 50) · Zero hung awaits |
| Idle Footprint (10s @ 120 FPS) & Leaving Combat | 12,000 idle OnUpdate calls (0.79 ms) + simultaneous PLAYER_REGEN_ENABLED stalls |
TimedSignalMap / NewTimer Sleep + Budgeted DeferOutOfCombat: 0 idle calls (0.35 ms) |
-100% idle OnUpdate calls · Zero post-combat microstutter |
Migrating From Legacy Ace3 Addons |
Full rewrite required for modern timers, unit filtering, and buckets | 1-Line client:EmbedAceCompat(addon) Mixin for drop-in AceTimer / AceEvent / AceBucket compatibility |
Drop-in adoption · Instant C++ unit-filter & Midnight upgrades |
Built to Power Every Addon in World of Warcraft
OmniFlow is built as one ultra-fast, shared standalone scheduling engine for your entire AddOns folder. Declaring ## Dependencies: OmniFlow lets every addon share one timing wheel, one profiler-guided coroutine budgeter, and shared RegisterUnitEvent shards instead of shipping dozens of redundant copies of AceTimer-3.0, AceEvent-3.0, and CallbackHandler-1.0:
- Unit Frames, Nameplates, WeakAuras-Style Displays & Healer Frames: Replace unfiltered
UNIT_AURA/UNIT_HEALTHscans withOnUnitEvent(4-unit C++ shard packing), Secret-Value-safeBucketcoalescers (supporting leading, trailing, debounce, andmaxWait), and priority-ordered handlers so non-target raid traffic never wakes Lua. - Combat Trackers, Boss Mods & UI Frame Builders: Protect action-bar and secure-frame updates during combat lockdown using key-deduplicated
DeferOutOfCombat(key, fn)queues that drain cleanly within frame budgets once combat drops. - Auction House, Bags, Tooltips, Quests & Catalog Addons: Turn heavy loops into smooth 60–144+ FPS coroutines with
ForRange/ForEach(MaybeYield()time-slice checks), structuredAsync/Await/All/Race/Timeout, hierarchicalCancelTokentrees, and 50×-deduplicatedAwaitItem/AwaitSpellloaders. - Multi-Addon Performance Harmony: 4-lane Deficit Round-Robin (
CRITICAL,INTERACTIVE,NORMAL,BACKGROUND) prevents one heavy background addon from starving another addon’s responsive UI interactions, while phase-jitter coalescing aligns non-exact periodic tickers so addons never wake in lockstep spikes. - Zero-Friction Upgrade Path From Ace3: Existing addons can keep their
ScheduleTimer,RegisterEvent,SendMessage, andRegisterBucketEventcalls intact with a singleflow:EmbedAceCompat(MyAddon)line — then adopt nativeOnUnitEvent,Async, andDeferOutOfCombatincrementally.
Under the Hood: Architecture Highlights
- O(1) 4-Level Hierarchical Hashed Timing Wheel + True Idle Sleep: Schedules timers across
L0(4s),L1(64s),L2(4,096s), and overflow min-heap tiers using pre-allocated pooled nodes indexed by 43-bit generational integer handles (safe stale-handle cancellation andO(1)per-owner intrusiveCancelAll). Non-exact periodic timers snap across62.5 mscoarse phase slots to prevent lockstep multi-addon frame spikes, and the entire engine parks on a singleC_Timer.NewTimedSignalMap(orNewTimer) handle with 0 idleOnUpdateCPU. C_AddOnProfiler-Guided 4-Lane DRR Coroutine Scheduler: Reads liveC_AddOnProfiler.GetAddOnMetric()(RecentAverageTime,CountTimeOver1Ms,CountTimeOver5Ms,CountTimeOver10Ms),GetFramerate(),InCombatLockdown(), and encounter state to throttle budgets dynamically with three built-in presets:ZeroSpike(default),Balanced, andMaxThroughput.- Structured Coroutines, Cancellation & Singleflight Asset Loading: Full
Async/Await/Sleep/All/Race/Timeoutcombinators with hierarchicalCancelTokentrees, sync-callback deadlock protection, chunkedForRange/ForEachiterators, and cross-flavorAwaitItem/AwaitSpellhandling Retail, WoW Forever (16001), and Classic Era safely. - C++ 4-Unit Shard Event Bus & Midnight Secret-Safe Buckets: Automatically packs up to 4 units per C++
Frame:RegisterUnitEventshard frame (promoting seamlessly if an unfiltered listener joins, demoting back when removed), dispatches listeners in priority order without table allocations, coalesces bursts safely even whenarg1is an unindexable Midnight secret value, and queues locked combat updates inDeferOutOfCombat. - Scoped Client Isolation, 1-Line
Ace3Compat & Runtime Guard: Every consumer receives a scoped client handle (Lib:NewClient()/Lib:Bind()) with independent timer/coroutine/event cleanup (client:Destroy()), plus drop-inEmbedAceCompat(target)and cryptographic ecosystem tamper/ban sync when paired withOmniSync. - Standalone 4-Tab Studio & Live Benchmark Lab (
/of,/omniflow): Inspect live scheduler frame budgets andC_AddOnProfilercounters, monitor active wheel slots & pooled handles, audit active unit-event shards / secret buckets / combat deferrals, switch budget presets on the fly, and run the 4-workload head-to-head Ace3 benchmark suite in-game.
30-Second Addon Author Quickstart
-- 1. Add "## Dependencies: OmniFlow" to your addon's .toc
local OmniFlow = LibStub("LibOmniFlow-1.0")
local flow = OmniFlow:NewClient()
-- 2. Zero-alloc O(1) timers + auto phase-jitter coalescing
local h = flow:After(0.5, function(msg) print(msg) end, "Ready!")
flow:Every(2.0, "OnHeartbeat", { target = MyAddon })
-- 3. C++-filtered Raid/Party unit events + Midnight secret-safe Buckets
flow:OnUnitEvent("UNIT_AURA", { "player", "focus", "target" }, function(unit)
MyAddon:RefreshAuras(unit)
end, { priority = 10 })
flow:Bucket("BAG_UPDATE", 0.15, function(counts, meta)
-- meta.secretCount / counts[key] never errors on Midnight Secret Values
MyAddon:UpdateBags(counts, meta)
end, { debounce = true, maxWait = 0.5 })
-- 4. Defer protected frame changes until combat ends (deduplicated + budgeted)
flow:DeferOutOfCombat("RebuildActionGrid", function() MyAddon:RebuildGrid() end)
-- 5. Adaptive coroutines + Singleflight async/await item/spell loading
flow:Async(function(ctx)
local ok, item = flow:AwaitItem(19019, 3.0)
flow:ForRange(1, 5000, function(i) MyAddon:ProcessRow(i) end, { checkEvery = 50 })
end, { priority = "BACKGROUND" })
-- Optional: 1-line migration from AceTimer-3.0 + AceEvent-3.0 + AceBucket-3.0
-- flow:EmbedAceCompat(MyAddon)
Slash Commands (Standalone Studio)
/ofor/omniflow— Open the 4-tab OmniFlow Diagnostic & Benchmark Studio/of bench— Run the 4-workload head-to-head benchmark vs.AceTimer-3.0,AceEvent-3.0, andAceBucket-3.0/of stats— Print scheduler preset, frame budget, active wheel timers, unit shards, secret shields, andIdleOnUpdate=0counters/of preset ZeroSpike|Balanced|MaxThroughput— Switch adaptive frame-budget aggressiveness live/of minimap— Toggle the OmniFlow Studio minimap button
Required Dependency Policy & License: All Rights Reserved (c) 2026 XyGoT. OmniFlow is non-embeddable — third-party addons may not bundle, copy, or redistribute LibOmniFlow-1.0 files inside their own archives (enforced by license and runtime guard). To use OmniFlow, other addon makers are required to list standalone OmniFlow as a Required Dependency on CurseForge (under Project/File Relations) and declare ## Dependencies: OmniFlow in their .toc, accessing it via LibStub("LibOmniFlow-1.0").