670 - Performance improvement

Hi there,
This issue in practice doesn't cause any problem at all, nor really affects any in game experience, so take your time when you want to take a look :)


I notice that GoGoMount has a relatively high CPU usage in CPU profiling. It has a slight delay when one clicks the GoGo buttons (but doesnt affect gameplay because it's usually forgiving when we want to use a mount).
When I trace down I find that GoGo_FilterMountsOut(PlayerMounts, FilterID) has the most CPU time, I think it's due to the repeatedly table creation and the iteratively table insertion inside. While you return the newly filtered table, according to the calls of this function in the code, the old PlayerMounts table is basically thrown away (to the garbage collectioni), which is also a minor performance decrease.

The GoGo_FilterMountsIn has similar issue though it takes less time.

I think a change that makes the table update in-place will do, but that may mean you need to change the table structure from sequential solid array to a sparse table, and also change the later "random" part. I can imagine that it's annoying here and there and not very productive lol  So again, you see if it's worth doing and take your time :)

P.S.: Not being pushing, I reckon it could reduce 80% of CPU time. But what's the point of speeding up a not-slow-at-all addon... err... (pondering) ... It's 400% COOLER!!  :D

User When Change
Everdreamer Nov 02, 2012 at 09:14 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of tiker tiker Nov 03, 2012 at 01:40 UTC - 0 likes

    The two functions GoGo_FilterMountsOut and GoGo_FilterMountsIn do get called quite a bit.  These were written back when Wrath came out.  Since then Blizzard has added so many mounts that these two functions do more and more table work causing them to do more work.

    I've considered just updating a single table but with the number of changes GoGoMount watches for it was a choice of the current setup where all of the processing is done when you click a button or by monitoring events like bag changes, spell changes, etc.  I had it monitoring things but found it a bit laggy moving stuff around in bags and in general when I didn't want it to be so I decided to move away from that.

    I'll take another look and see what I can do to lower the CPU cycles when mounting.

    Yubikey - Secure the web!

    Want to chat? You'll find me here if I'm online:
    [email protected]
    (XMPP / Jabber Group Chat)

  • 1 comment


Nov 02, 2012
New - Issue has not had initial review yet.
Enhancement - A change which is intended to better the project in some way
Medium - Normal priority.

Reported by

Possible assignees