Add some diagnostics to see where the time is being spent,