rhbz1102964 - heuristic optimization