While you are using the new ValidateItems, which is good, you still should be checking if they have already been identified, in order to avoid going through your inventory and re-identifying them unnecessarily. See https://github.com/s2games/Heroes-of-Newerth-Bots/blob/Community/bots/soulreaper/soulreaper_main.lua#L228 for an example