When can code review be a problem?

A customer recently asked me to look into a program that used to run in 5 minutes but now took 1 to 4 hours. It’s used by thousands of people all over the world all day long. 

It iterated through an array doing 3 SQL SELECTs against non-indexed files for each element. There used to be about 50 elements in the array; now there were more than 5000. I rewrote the whole thing in one day to do a total of 4 SELECTs and run in 12 seconds. 

But it took 6 days to get through QA (while the users continued to suffer). QA’s biggest complaint? I indented 4 spaces instead of the (unpublished) standard of 5 spaces. 

Of all the things I have to deal with, nothing pisses me off more. Software QA is becoming more and more like TSA security at the airport: illogical, and obviously so. Last year, flagrantly unacceptable code was promoted without question while its replacement was held up on a meaningless detail. 

We programmers are a funny lot. Make us struggle for business or technical reasons and we adapt beautifully. Make us struggle for something stupid and we just get pissed off and do something else. What a pity.