added a lot of perf logging