Quantcast Huge garbage creation from map data providers - WoWInterface
Thread Tools Display Modes
07-26-18, 07:06 AM   #1
Gello
A Firelord
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 487
Huge garbage creation from map data providers

edit: I meant to post this in the Lua/XML help forum. Sorry!

I don't know if this is a bug or accepted behavior, but it appears that using a data provider will create many MB of garbage over a short period of time while the mouse is over the world map.

To test:
1. Create an addon with one line of code (I've noticed this behavior in more fleshed out addons too):
Code:
WorldMapFrame:AddDataProvider(CreateFromMixins(MapCanvasDataProviderMixin))
2. Disable all addons as you log in aside from this one. (For a less rigorous test you can enable an addon to track memory usage too.)
3. Note the memory usage of the single addon. (From mouseover of Game Menu microbutton if you don't have an memory usage addon enabled.)
4. Open the world map and put the mouse over it.
5. Periodically check memory usage.

On my client, the 3k attributed to the addon balloons to 3 MB within a minute. It will reset periodically (meaning it's likely garbage being collected) and then march back up.

With multiple addons having a data provider, one unlucky addon gets the blame and I've seen it add 5MB within a minute before dropping back.

Has anyone else noticed this behavior? Is there something we can do to minimize it? Or is it accepted behavior and we should ignore it?

Last edited by Gello : 07-26-18 at 07:15 AM.
  Reply With Quote
07-26-18, 07:46 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 916
Thread Here.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.
  Reply With Quote
07-26-18, 05:38 PM   #3
Nimhfree
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 244
This happens with my addon, but the cursor need not be on the world map. I have the cursor over the game menu and I see the addon memory usage climb and then when garbage collection kicks in, go back down.

The more pins on the map, the quicker the memory usage rises. None of my map data code is being called as this is happening. Therefore I believe the issue is with Blizzard's code.
  Reply With Quote
07-26-18, 05:52 PM   #4
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 60
Originally Posted by Fizzlemizz View Post
Thread Here.
This is a similar issue but not the same. I had noticed this before when I was doing some stuff with HereBeDragons and I contacted the author because I thought it was a bug with HBD but they tracked it down to the maps label provider. When you have your mouse over the map it is running an update function that contains C_Map.GetMapInfoAtPosition. That memory usage is then blamed on the first addon loaded that has any map data provider code.
__________________
Thomas aka Urnn
  Reply With Quote

WoWInterface » PTR » PTR UI Bugs » Huge garbage creation from map data providers

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off