Implement one of zabra's (Boris S.) performance fixes, make the performance test more lenient