Uncle Bob has a couple examples of why performance tuning almost always has surprises in store for you.
Bob Martin (Uncle Bob) relates a couple of stories on performance tuning and why your expectations are nearly always wrong.
The moral of the story … measure, measure, measure whenever you have a performance problem. The root cause is prabably not where you expect it to be.