significant performance increase for util.GetPids