View Single Post
07-30-12, 04:43 PM
A Fallenroot Satyr
Join Date: Mar 2009
Originally Posted by
The two versions don't differ that much. Both use OnUpdate. (Even the animationgroup does).
The only big difference is that in the traditional way you iterate over all WorldFrame:GetChildren() all the time.
In the new version you check just one index that is either available or not.
I'm curious about how expensive WorldFrame:GetChildren() is. Assume: "local frames = select('#', WorldFrame:GetChildren())". Now you only have to do something if "frames" has changed from previous iteration, and you'd only have to iterate from the previous value of "frames" to its new one. So the cost of the function pretty much equals select('#', WorldFrame:GetChildren()).
Last edited by ballagarba : 07-30-12 at
View Public Profile
Send a private message to ballagarba
Find More Posts by ballagarba