I'm well aware of this issue.
What happens during thoses lookups is that the game engine generates thousands of UNIT_NAME_UPDATE events. Each of these events is catched by the SecureRaidPetHeaderTemplate implementation and trigger a call to SecureGroupPetHeader_Update, which takes some time. "Some time" multiplied by a several thousands equals "a severe lockup". I have a log of ~2500 UNIT_NAME_UPDATE events sent over 2,5 seconds, for 6 pets only !
The same problem was occuring in 2.1 for player units. There is still some workaround code in Grid for this issue, that for some reason beyond my understanding don't work for pets, but the bug is not in Grid.
I think it is a separate issue. To summarize, there are two issues with "Pet for Grid" that are bugs in the game engine:
- First issue: When pets are summoned in an instance and outside of visual range, then the unit appears as valid (UnitExists() returns true), but UnitName() returns UNKNOWNBEING, and other information about the unit (classification, level, ...) are also unknown. This does not occur outside of instances.
- Second issue: When pets enter visual range, an large number of UNIT_NAME_UPDATE are sent for each of them, which cause severe lockups because the handling of this event takes a lot of time.
I assume someone has posted this on the UI & Macros WoW forum for Slouken to see?