find/fix performance bottleneck