A high-performance tool for World of Warcraft addon developers to identify performance-killing global variables in Lua code.
The program leverages the Mikk's FindGlobals script to check.
WoW Global Check analyzes your addon's Lua files to find global variable usage patterns that can cause:
- Performance issues - Non-localized globals are slower to access
- Addon conflicts - Global variables can interfere with other addons
- Memory leaks - Unintended global assignments can accumulate over time
The tool scans your addon directory and reports exactly where global variables are being accessed or assigned, helping you optimize your code for better performance.
World of Warcraft addons run in a shared Lua environment where:
- Global variable access is significantly slower than local variables
- Accidental global assignments can pollute the global namespace
- Global conflicts between addons can cause mysterious bugs
- Performance issues compound during combat or in raids
This tool helps you catch these issues early and maintain clean, fast addon code.
-
Download the latest release for your platform
-
Run the tool on your addon directory:
wow_global_check -d "C:/World of Warcraft/_retail_/Interface/AddOns/YourAddon" -
Review the output to find global variable usage
-
Fix the issues by localizing variables or using proper namespacing
Download the latest wow_global_check-Download from GitHub Releases.exe from the releases page and place it in your PATH or addon directory.
# Requires Rust 1.70+
git clone https://github.com/wind-addons/wow_global_check.git
cd wow_global_check
cargo build --releaseScan your addon directory:
wow_global_check -d "C:/World of Warcraft/_retail_/Interface/AddOns/MyAddon"Output Sample:
🔍 WoW Global Variable Checker v0.1.0
📋 Loaded config from: config.yaml
📁 Directory: E:\World of Warcraft\Addons\ElvUI_WindTools
📄 Output: E:\World of Warcraft\Addons\ElvUI_WindTools\check.txt
🚀 Lua root: E:\World of Warcraft\Addons\WindToolsScripts\lua
🧵 Concurrency: 30
🚫 Ignore patterns: 2
ℹ️ Using Lua runtime: E:\World of Warcraft\Addons\WindToolsScripts\lua
ℹ️ Searching for Lua files in 'E:\World of Warcraft\Addons\ElvUI_WindTools'...
📁 Found 444 Lua files to analyze
✅ Analysis complete! (avg: 119.2 files/sec)
✅ Results saved to: E:\World of Warcraft\Addons\ElvUI_WindTools\check.txt
📊 Analysis complete! Found: 2 unique global variable patterns
1. Large addon with custom configuration:
# Create a config file for complex setups
wow_global_check --create-config -d "C:/WoW/AddOns/BigAddon"
# Edit the generated config.yaml, then run:
wow_global_check -c config.yamlCreate a config.yaml file for persistent settings:
# Required: Directory to scan (supports multiple directories)
dir: "C:/World of Warcraft/_retail_/Interface/AddOns/MyAddon"
# Optional: Output file (omit for console output)
output: "C:/World of Warcraft/_retail_/Interface/AddOns/MyAddon/global_check_results.txt"
# Required: Lua runtime path for enhanced analysis
lua_root: "C:/lua"
# Optional: Number of parallel workers (default: number of CPU cores)
concurrency: 8
# Optional: Files and patterns to ignore
ignores:
- "Libraries/" # Ignore entire directories
- "*_test.lua" # Ignore test files
- "vendor/**/*.lua" # Ignore vendor code
- "!Libraries/MyLib.lua" # Exception: don't ignore this filewow_global_check [OPTIONS]
OPTIONS:
-d, --dir <PATH> Directory to scan (can be used multiple times)
-o, --output <FILE> Output file (default: console)
-c, --config <FILE> Configuration file (default: config.yaml)
-j, --concurrency <NUM> Number of parallel workers
-v, --verbose Show detailed progress information
-q, --quiet Suppress progress output
--json Output results in JSON format for CI/CD integration
--strict Exit with error code if globals found
--create-config Generate a sample configuration file
--create-gcignore Generate a sample .gcignore file
-h, --help Show this help message
-V, --version Show version informationCreate a .gcignore file in your addon directory to specify files to ignore:
# Ignore third-party libraries
Libraries/
Libs/
# Ignore test files
*_test.lua
*_spec.lua
test/
# Ignore generated files
*.generated.lua
# But keep specific files (use ! prefix)
!Libraries/MyCustomLib.luaThis project is licensed under MIT License (LICENSE-MIT)
Made with ❤️ for the WoW addon development community