Investigate Item triggers performance
mrbuds opened this issue ยท 1 comments
Description
From a profiling result posted on discord WA(1).txt it seems BAG_UPDATE_COOLDOWN happens very frequently and is spiky
Systems:
timer tick 102728.70ms, 41.37% (1.35ms)
generictrigger BAG_UPDATE_COOLDOWN 42000.42ms, 16.92% (7.90ms)
generictrigger COMBAT_LOG_EVENT_UNFILTERED 26880.04ms, 10.83% (8.56ms)
generictrigger COMBAT_LOG_EVENT_UNFILTERED_CUSTOM 21875.57ms, 8.81% (8.52ms)
bufftrigger2 16785.13ms, 6.76% (2.78ms)
generictrigger cd tracking 16780.50ms, 6.76% (5.75ms)
dynamic conditions 8295.90ms, 3.34% (0.45ms)
User linked this aura https://wago.io/FIhLRoBEQ which use quite a lot of item count and item cooldown triggers.
WeakAuras Version
5.3.3
World of Warcraft Flavor
Retail (Default)
Tested with only WeakAuras
- Yes
- No
Lua Error
No response
Reproduction Steps
.
Last Good Version
No response
Screenshots
No response
Export String
No response
i took a look at this, and i found a few things:
using an item (in this case, an Emerald Green Apple) produces several BAG_UPDATE_COOLDOWN events in the same frame:
Since that event is very nonspecific, perhaps we can bucketize our handling of it. Out of curiosity, I tried doing a find+replace on BAG_UPDATE_COOLDOWN -> BAG_UPDATE_DELAYED
, and I didn't notice anything obviously broken. The wowpedia page for that event suggests it might be exactly what we want.
Also, about every 5-6 seconds, BAG_UPDATE_COOLDOWN will fire for apparently no reason. This seems to only happen in areas populated by other players, so presumably this is something to do with player interaction but who knows.