Originally Posted by Zasurus
While normally I would agree in this case I am not looking for a way to fix broken code I am looking for a way of slowing the execution of code down or reducing its priority so it would be code independent (hopefully! ;-))
Zas
|
You cannot do that. Addons are not run in separate threads, nor are they interleaved. If say, we have addon A and addon B, and both do something OnEvent. When OnEvent occurs, first A gets the CPU and runs until it gives it up (returns). Then B gets the CPU. Then WoW draws the next frame. There's no parallelism there to screw with, so you can't just set the priority down. Some high CPU addons (such as QuestHelper) implement CPU usage controls with Co-routines (which are NOT parallel, read the Lua doc for details), but for most that shouldn't be necessary. Your best bet is examining your code and trying to figure out whats causing it.