descention / AmeisenBotX

A bot, aimed at full automatic gameplay
GNU General Public License v3.0
2 stars 0 forks source link

Improve performance of getting next target #3

Open descention opened 10 months ago

descention commented 10 months ago

AmeisenBotX.Plugins.Questing.Database/QuestingDatabaseEngine.cs is having performance issues getting the closest target for a quest. The below block of code can take up to 30 seconds to process. The issue probably scales with the number of units in the vicinity. Getting the distance for each one is probably the issue, but I've not confirmed that yet.

https://github.com/descention/AmeisenBotX/blob/cc200c9f5fbb548d262a3f1fad2ce981b41e9867/AmeisenBotX.Plugins.Questing.Database/QuestingDatabaseEngine.cs#L446-L450