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 |
|---|---|---|
| tiker | Jul 28, 2014 at 17:14 UTC | Changed status from Accepted to Started |
| tiker | Jul 28, 2014 at 17:14 UTC | Changed status from New to Accepted |
| Everdreamer | Nov 02, 2012 at 09:14 UTC | Create |
- 4 comments
- 4 comments
Facts
- Last updated
- Jul 28, 2014
- Reported
- Nov 02, 2012
- Status
- Started - Work on this issue has begun.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Votes
- 0
- Reply
- #4
tiker Jul 29, 2014 at 03:32 UTC - 0 likesFirst performance increasing fix is in place with GoGoMount 5.4.14.
Want to chat? You'll find me here if I'm online:
[email protected]
(XMPP / Jabber Group Chat)
- Reply
- #3
tiker Jul 28, 2014 at 17:14 UTC - 0 likesReferences to other tickets which have been closed:
Ticket 764 (debug logs with timing examples)
Ticket 761 (SET timingMethod .. )
- Reply
- #2
tiker Jul 28, 2014 at 17:10 UTC - 0 likesI'm raising this ticket from the dead. I think I have figured out a new design for GoGoMount to reduce the processing and memory consumption. Stay tuned. ;)
- Reply
- #1
tiker Nov 03, 2012 at 01:40 UTC - 0 likesThe 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.