Improve speed by comparing whole buffers first
@@ -425,6 +425,8 @@ async function run_tests(): Promise<boolean> {
await write_image()
} else {
status.reference = existing
+
+ if (!existing.equals(current)) {
const diff_result = diff_image(existing, current)
if (diff_result != null) {
may_retry = true
@@ -438,6 +440,7 @@ async function run_tests(): Promise<boolean> {
}
}
}
+ }
break
case "save":
await write_image()
