Understanding Performance Impact
What Affects Performance
Trigger Frequency
How often triggers check their conditions
Custom Code Complexity
Computational cost of Lua scripts
Number of Active Auras
Total auras loaded and checking
Group Iterations
Scanning party/raid members
Performance Monitoring
Use WeakAuras’ built-in profiler:- CPU time per aura
- Number of trigger checks
- Most expensive auras
- Memory usage
Load Conditions
The most effective optimization: don’t load auras when they’re not needed.Essential Load Conditions
Class & Spec
Class & Spec
Only load for relevant classes:Impact: Prevents loading on other classes/specs entirely.
Combat State
Combat State
Many auras only matter in combat:Impact: Aura doesn’t exist while out of combat.
Zone Type
Zone Type
Limit to specific content:Impact: Don’t load PvE auras in PvP, etc.
Specific Zones
Specific Zones
For encounter-specific auras:Impact: Only loads in that specific encounter.
Player Level
Player Level
For leveling auras:Impact: Automatically disabled at max level.
Talent Conditions
Talent Conditions
When talent-dependent:Impact: Only loads when talent is taken.
Combining Load Conditions
Stack multiple conditions for precise loading:Trigger Optimization
Use Specific Triggers
- Good: Specific Spell ID
- Bad: Name Matching
- Worse: Custom Scanning
Avoid Status-Type Custom Triggers
Status triggers check constantly:Event Filtering
Filter events early in custom triggers:Minimize Group Iterations
Custom Code Optimization
Cache Expensive Calls
Early Returns
Throttling Updates
Avoid Table Creation
Animation Performance
Limit Animation Complexity
Simple Animations
Fade, slide, or zoom are efficient
Avoid Complex Paths
Custom animation paths with many points are expensive
Limit Simultaneous Animations
Don’t animate 50 icons at once
Disable When Not Visible
Animations on off-screen auras waste resources
OnUpdate Actions
Memory Management
Saved Data
Limitaura_env.saved usage:
Clean Up
Unregister events when done:Organizing for Performance
Group Similar Auras
Use groups with shared load conditions:Dynamic Groups
For multiple similar auras:Profiling & Debugging
Identify Problem Auras
Profile Output
- Add event filtering
- Use specific debuff IDs
- Add load conditions (only in raids)
Debug Logging
Use DebugPrint sparingly:Performance Checklist
Load Conditions
Load Conditions
- Class/spec conditions set
- Combat state appropriate
- Zone/instance type limited
- Talent/level requirements added
Triggers
Triggers
- Using built-in triggers when possible
- Spell IDs instead of names
- Event-based, not Status-type
- Event filtering implemented
- No unnecessary group iterations
Custom Code
Custom Code
- Expensive calls cached
- Early returns for quick rejection
- No table creation in hot paths
- Updates throttled when appropriate
- No “On Every Frame” actions
General
General
- Animations kept simple
- Saved data minimal
- Groups used for shared load conditions
- Profiled during typical usage
- No obvious performance warnings
Common Performance Issues
Issue: High CPU Usage
Causes:
- Status-type custom triggers
- Group scanning every frame
- No load conditions
- Use event-based triggers
- Add load conditions
- Cache API calls
Issue: Lag Spikes
Causes:
- Saving large aura_env.saved
- Complex combat log parsing
- Creating many objects
- Minimize saved data
- Filter events early
- Reuse objects/tables
Issue: Memory Growth
Causes:
- Tables never cleared
- Frames not cleaned up
- Large saved variables
- Clear old data
- Unregister events when done
- Limit saved data
Issue: Slow Load Times
Causes:
- Too many auras loading
- Large saved data
- Complex initialization
- Add load conditions
- Reduce saved data
- Simplify On Init code
Advanced: Batch Updates
For auras that update together:Next Steps
Custom Triggers
Optimize trigger patterns
Lua Scripting
Efficient Lua practices
Creating Auras
Back to basics