Hi,
This patch reduces amount of visibility update and AI relocation notification operations -- in this way you will get some performance speedup.
In original sources these functions called too frequently - this wastes power of CPUs for nothing.
We should filter redundant visibility update operations.
Some statistics: optimization decreases amount of visibility update operations in 8-10 times(expected decrease in CPU utilization about 15-20%).
Currently these are two different ways of how it should be optimized.
The first way:
Visibility and AI notification operations processed each N milliseconds. To avoid CPU spikes these operations processed simultaneously.
Possible problem: as a result of fixed time interval between visibility updates,
its impossible to increase frequency of these operations for fast moving players/creatures.
branch1: https://github.com/SilverIce/mangos/tree/visibility_optimization_old_way
Second way:
Can't say too much. No problems with visibility of fast moving units: frequency of visibility updates scales with unit's speed.
branch2: https://github.com/SilverIce/mangos/tree/visibility_op2_simplified
Note: added few new config setting to find optimal parameters, so don't forget update your config files
Also, these config options could be reloaded during runtime: you can experiment with these options without restarting
I think second way is more progressive, but I don't know performance difference.
Please, test the patches, feel free to comment, report test results..