View Single Post
10-28-08, 01:57 PM   #2
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Originally Posted by sigg View Post
204519 hits UnitBuffcache
37139 hits UnitBuff
(Reduce to 20% server call)

Time execution from UnitBuffCache : 10µs
Time execution from UnitBuff : 29µs
(Divide by 3 the time execution)
Interesting Sigg! A couple of things to think of:
- UnitBuff and UnitDebuff are "wrapper" functions around UnitAura now - be interesting to see the numbers for the raw UnitAura function.
- These calls don't go to the "server" as such, they are processed by the client engine based on the data that is sent periodically from the server to the game client, so all the processing is local.
- As you noted, seems like a 3x speedup by using the cache mechanism. I'm guessing your cache only checks the actual values every so-many milliseconds (or so many frames)? Or does it rely on UNIT_AURA events to update the cache?
- Lastly, hope Blizz looks at this - maybe they can speed up their UnitAura code

-- Cirk
__________________
Cirk's Addons
  Reply With Quote