Don't have them do anything unless there's a possibility of there being something of interest. The best way to handle this is to split things up into areas and don't call the AI routines until a player enters the area, and then stop it when the last player leaves an area.
Alternatively, if there are far fewer players/objects than NPCs, have the players/objects be the one searching for NPCs to activate.
Note that if you HAVE to have the NPCs wandering regardless of player presence, that's okay, so long as you aren't searching for things every step. The resource hog is going through the list, not taking random steps.
Thanks a bunch Garthor, I'm going to try going with the alternate route of having the players doing the scanning. This was my initial thought but having someone suggest it being a possible solution is very reassuring.
Alternatively, if there are far fewer players/objects than NPCs, have the players/objects be the one searching for NPCs to activate.
Note that if you HAVE to have the NPCs wandering regardless of player presence, that's okay, so long as you aren't searching for things every step. The resource hog is going through the list, not taking random steps.