Excessive table creation in CheckInspectQueue #4


  • New
  • Defect
Open
  • _ForgeUser300352 created this issue Jul 4, 2011

    I would consider this low priority. It's just one of those things people sometimes get picky about and which I'm trying to thwart.

    What steps will reproduce the problem? 1. Queue up a query for a player not in inspect range 2. Monitor the memory consumption of your addon that's using LibTalentQuery. 3. You'll notice it constantly grows.

    What is the expected output? What do you see instead? No memory consumed when not needed.

    What version of the product are you using? 4.0 Release 1

    Please provide any additional information below.

    The issue is this block of code in the CheckInspectQueue function:

    	if (not next(inspectQueue)) then
    		if (next(garbageQueue)) then
    			-- Retry initially failed inspects
    			lib.inspectQueue = garbageQueue
    			inspectQueue = lib.inspectQueue
    			lib.garbageQueue = {}
    			garbageQueue = lib.garbageQueue
    		else
    			frame:Hide()
    		end
    	end
    

    It's constantly swapping tables (which is fine) but also creating a new table (not fine). I realize from a coding perspective it's simple to do a table swap, but perhaps finding a way to do it that doesn't create unnecessary tables every 2 seconds would be beneficial. I looked for a quick fix myself but those two tables are used in a few places.

    For specifics, I am using this in Hermes and that's where I first discovered while tracking down growing memory. It's honestly not that bad, in the time it took me to write this message (and with probably about 10 people trying to be queried while I stand outside a raid dungeon, it's grown by about 50k before the garbage collector finally releasing the memory.

  • _ForgeUser300352 added the tags New Defect Jul 4, 2011
  • _ForgeUser300352 posted a comment Jul 4, 2011

    Edit: I meant to say 500k before it gets garbage collected, not 50k


To post a comment, please login or register a new account.