24.07.2016, 09:13
Optimization includes...
Timer, using a lot of timers can cause lag
Variables, using a lot of variables takes place in memory, Ultra-H uses less memory that the minimum required for your gamemode, resulting lag.
Coding tips, optimization also include how you type the code, 'cause the code is being executed, if you have un-optimized then its going to slow down the process.
Example:
Timer, using a lot of timers can cause lag
Variables, using a lot of variables takes place in memory, Ultra-H uses less memory that the minimum required for your gamemode, resulting lag.
Coding tips, optimization also include how you type the code, 'cause the code is being executed, if you have un-optimized then its going to slow down the process.
Example:
PHP код:
// UN-Optimized use of variables
new var1;
new var2;
new var3;
// Optimized use of variables
new var1, var2, var3;
// UN-Optimized use of variable (setting values)
var1 = 0;
var2 = 0;
var3 = 0;
// Optimized use of variables (setting values)
var1 = var2 = var3 = 0;