[Work-In-Progress] Dispatcher Profiler – Real-Time Lag Detection and Scoreboard System
“Has anyone else ever tried to do this? Or am I just deep in the rabbit hole now?”
Hi Hive. I'm currently on a sick semester from university (AI studies), and I somehow ended up here after accidentally spending 50+ hours deep in JASS and GUI spaghetti during the last four days.
What follows is a prototype system — a real-time task monitoring profiler for Warcraft III that logs and optionally displays which game logic is taking the most time to process per tick. It’s intended to help alpha testers report in-game lag and give mapmakers immediate insight into problematic code paths — ideally before players even finish their match.
This post isn't just to show off. It's to ask:
- Has anyone done anything like this before?
- Can this idea be useful to others?
- Is anyone interested in collaborating with me to help make it real?
1. What is the Dispatcher Profiler?
It’s a system that:
- Profiles how long each scheduled trigger or logic block takes per dispatcher cycle (every 0.03s+)
- Tracks both runtime and execution count per task
- Logs cumulative tick runtime and task count
- Optionally displays top lag contributors in a GUI-compatible multiboard
Example goal: You have a Gabe AI, Bobby Kotick AI, and wave spawning triggers. One of them starts freezing your game every few seconds. This profiler system lets you see which task is to blame.
But it’s not working… yet.
We’ve confirmed that the backend works, and it leads to possible FPS improvements and faster pathing response. But our multiboard refuses to appear on-screen. We’ve tried everything from hijacking the faction scoreboard to brute-force ExecuteFunc calls, GUI trigger masking, and delayed creation logic.
No luck. But the profiler itself still runs — and logs valid data.
2. What Problem Is It Trying To Solve?
Modern Warcraft III maps have become more complex — with dozens of AI scripts, event systems, wave timers, and UI updates running concurrently. Even with the powerful dispatcher/timer model many use to regulate periodic logic, there's no good visibility into what's slowing the game down.
This profiler attempts to:
- Identify which exact task or system is hogging performance
- Highlight potential desync-causing logic before it becomes critical
- Allow live in-game debugging during alpha test sessions
- Empower players to report bugs, lag, and feedback during the game — not just post-replay
It’s a lag profiler, real-time scoreboard, and debug trigger system in one.
And it’s all designed with GUI compatibility in mind — no scary syntax necessary to integrate it into your map.
3. Core Features
- Per-tick profiling — Each registered task or trigger is timed on every dispatcher cycle
- Logging system — Cumulative runtime, frequency, and average time are recorded
- Optional multiboard visualization — Displays the top most expensive tasks
- Chat command toggles — e.g., -toggleprofiler (when it's working!)
- Dev-only filters — Profiling tools are only visible to trusted players or in WorldEdit testing
- Hijacks and replaces existing scoreboard (or tries to…)
4. Why Isn’t the Multiboard Working?
We don't fully know yet. But we've tried:
- Calling
MultiboardDisplay
at different stages (Map Init, 30s delay, post-load) - Force-hiding GUI-created boards
- Using ExecuteFunc and trigger hijacks to simulate GUI initialization
- Disabling all GUI scoreboard triggers to avoid overwrite
- Making sure board creation and update logic is running every few seconds
And it still doesn’t show up.
The profiler runs in the background. Logs update. Chat commands are accepted. But the board is invisible — either minimized, overwritten, or entirely discarded due to Reforged quirks.
If you’ve ever had a multiboard refuse to appear, we’d love your advice.
5. Powered by AI + BetterTriggers + Desperation
This project started as a rough JASS idea and quickly exploded into a BetterTriggers migration, AI-supported debugger, and file modularization experiment.
We are now:
- Migrating a 100,000-line monolithic JASS file into ~7,000 modular BetterTriggers-compatible
.j
files - Using AI to auto-detect structural issues, malformed
if/endif
, invalid global declarations, etc. - Running Python + shell scripts to batch merge, verify, and deduplicate modular code
- Working on a 10-step repair automation plan to recover malformed logic from legacy code
This isn't just one system. It's a whole workflow experiment. And it’s exhausting, but working.
6. Why Post This? — Collaboration & Curiosity
This post exists for a few reasons:
- To ask: Has anyone else ever attempted something like this?
- To offer: Do you want to collaborate? I’m very open to working with experienced mapmakers, AI engineers, or anyone deep in the JASS/GUI world.
- To learn: There are hundreds of quirks in Warcraft III scripting — I want to learn the best practices and improve this system for real-world use.
This isn’t a finished product. It’s a prototype, built by someone who only touched World Editor for the first time 4 days ago. But progress has been fast — and it’s powered by 52 hours of straight focus and a lot of AI-powered research.
7. Roadmap and What’s Next
The current state of the Dispatcher Profiler system:
- Core dispatcher profiling works
- Multiboard tracking logic works
- Chat toggles are stubbed in
- Multiboard rendering is not visible yet
- BetterTriggers migration in progress
- AI-based modularization underway (~30% complete)
Next Steps:
- Fix multiboard visibility once and for all
- Enable player-specific toggle and visualization
- Add better task registration API for map devs
- Improve profiler load efficiency (detect overloads)
- Finish full migration to BetterTriggers
- Document and share templates for GUI-only users
8. Spaghetti Triggers Deserve Love Too
A note to all GUI developers: your map is not broken because it uses GUI.
JASS/LUA elitism has its place, but let’s be honest — World Editor is what made this game moddable in the first place. What this system aims to do is:
- Work inside your spaghetti without judgment
- Run alongside GUI triggers without overwriting or deleting anything
- Empower debugging and optimization without forcing code rewrites
- Be something that new and veteran mappers can plug in, benefit from, and ignore when not needed
If you’ve ever debugged a 200-trigger system with no visibility, this tool might be for you.
9.

Every part of this post has been written, refined, and organized in collaboration with AI — including this section you’re reading now. Why? Because it saves time and enables deep dive exploration far beyond a single human’s focus span. Transparency matters, so we want to be upfront about it.
What you’ll find below are downloadable .txt files containing summaries, breakdowns, and distilled knowledge from dozens of sources across Hive Workshop, Patch Notes, forums, legacy guides, and scripting posts.
These files were created using an AI-assisted workflow, and include carefully indexed references from trusted community sources.
Here’s what’s included:
- Advanced Preloading Strategies – 26 Sources
Breaks downPreload()
vsPreloadGen
, segmenting vs batching, and how to minimize impact on map init. Includes multiplayer safety tips.
- JASS Compile-Time Errors & Limits – 19 Sources
Every common (and obscure) JASS compile failure, matched with known causes and engine limits. Ideal for debugging 100K+ line maps.
- Performance Optimization (GUI & JASS Hybrid) – 14 Sources
What causes FPS drops in Reforged? Why are some maps more stable than others? This covers object handle bloating, timers, effects, and much more.
- Preventing Desyncs in HD/SD Maps – 29 Sources
Desyncs are the death of multiplayer. This file documents root causes, like randomization, visuals, and local calls — and how to work around them.
- Suppressing Neutral Minimap Icons – 22 Sources
Niche but vital: How to avoid cluttered minimaps using.mmp
file manipulation and object data strategies. Includes modern Reforged notes.
You can open these in any text editor and search for key phrases — they’re made for both beginners and deep tech tinkerers alike.
If you’ve ever struggled with a weird crash, minimap bug, lag spike, or desync that had no obvious cause — these might help.
Files attached below as .txt
If you're interesting in helping me with this project or providing me with any advice, please contact me on discord at:
"larse."
I am also present in the community Hive Workshop discord!
Attachments
-
Advanced Preloading Strategies for Warcraft III Reforged Maps 26 Sources Deep AI Research.txt56.2 KB · Views: 5
-
Comprehensive List of JASS Compile-Time Errors and Engine Limits Deep Research AI 19 sources.txt34 KB · Views: 9
-
Optimizing Performance in Warcraft III Reforged Maps GUI JASS Hybrid Deep Research AI 14 Sources.txt58.1 KB · Views: 6
-
Preventing Desync in Warcraft III Reforged Maps HD or SD Deep Research AI 29 Sources.txt33.6 KB · Views: 3
-
Suppressing Neutral Minimap Icons in Reforged Lobby Preview Deep Research AI 22 Sources.txt17.4 KB · Views: 4
Last edited: