4 - Excessive table creation in CheckInspectQueue

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

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.

User When Change
inthedrops Jul 05, 2011 at 01:32 UTC Create

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

  • 1 comment
  • Avatar of inthedrops inthedrops Jul 05, 2011 at 01:35 UTC - 0 likes

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

  • 1 comment


Jul 05, 2011
New - Issue has not had initial review yet.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees