β‘Optimization
WaveShield is designed to be highly optimized out of the box, but performance can be affected by other scripts on your server. This guide will help you identify and resolve performance issues.
Performance Monitoring
Use the debug command to monitor what functions of your scripts are being checked by WaveShield:
+ws_debug
This command will display logs in your F8 console showing every function execution that WaveShield monitors on your server.
Identifying Performance Issues
When you run +ws_debug
, watch for:
Function spam - Functions being called excessively
High-frequency loops - Scripts running continuous loops without proper delays
Repetitive checks - The same functions being triggered repeatedly in short intervals
These patterns can cause:
FPS drops
Increased latency
Server performance degradation
Higher resource consumption
Common Optimization Solutions
For Developers
Add proper delays to loops:
-- Bad: No delay in loop
while true do
-- Your code here
Wait(0)
end
-- Good: Proper delay added
while true do
-- Your code here
Wait(1000) -- Adjust timing as needed
end
Avoid unnecessary function calls:
Only call functions when actually needed
Cache results instead of recalculating repeatedly
Use events instead of continuous polling when possible
Optimize timer-based operations:
Use appropriate intervals for different operations
Avoid running heavy operations every frame
If you can't fix it yourself because the script is escrowed or locked:
Review problematic scripts:
Run
+ws_debug
and monitor the consoleIdentify scripts causing excessive function calls
Contact the script developer for optimization
Consider temporarily disabling problematic scripts if needed
Regular monitoring:
Periodically check debug logs during peak server hours
Monitor performance after adding new scripts
Keep WaveShield updated for latest optimizations
Best Practices
Test new scripts with
+ws_debug
before deploying to productionMonitor regularly during different server load conditions
Update scripts that show excessive function calls
Balance security with performance - some checks are necessary for protection
Getting Help
If you're experiencing performance issues:
Run
+ws_debug
and document the problematic functionsNote which scripts are causing the most spam
Check if the issue occurs with those scripts disabled
Contact WaveShield support with your findings
Last updated