Added debugging print statements to determine the slow step of this analysis.