# [PATCH] Performance fix for pickaxe.

1 messages from 2005-05-23 to 2005-05-23. Participants: Junio C Hamano.
Thread: https://gitlist.dev/t/701

## Junio C Hamano, 2005-05-23 07:25

Subject: [PATCH] Performance fix for pickaxe.
Message-ID: <7vis1a76as.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vis1a76as.fsf%40assigned-by-dhcp.cox.net

```
The pickaxe was expanding the blobs and searching in them even
when it should have already known that both sides are the same.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diffcore-pickaxe.c |    3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -44,7 +44,8 @@ void diffcore_pickaxe(const char *needle
 			if (contains(p->one, needle, len))
 				diff_q(&outq, p);
 		}
-		else if (contains(p->one, needle, len) !=
+		else if (!diff_unmodified_pair(p) &&
+			 contains(p->one, needle, len) !=
 			 contains(p->two, needle, len))
 			diff_q(&outq, p);
 		if (onum == outq.nr)
------------------------------------------------


```
