Using profiling to find bottlenecks