Optimize CNodeDefManager::getIds