php-qrcode-detector-decoder
php-qrcode-detector-decoder copied to clipboard
Maximum execution time of 60 seconds exceeded
I am experiencing execution timeout for 147 kB image.
SW: PHP: 8.1.2 GD: bundled (2.1.0 compatible)
Usage:
$qrcode = new QrReader($img_file);
echo $qrcode->text();
When inspecting $qrcode
:
Zxing\QrReader {[#1281]()
-bitmap: Zxing\BinaryBitmap {[#1288]()
-binarizer: Zxing\Common\HybridBinarizer {[#1287]()
-source: Zxing\GDLuminanceSource {[#1286](chrome://devtools/content/netmonitor/index.html#sf-dump-990075822-ref21286)
-width: 999
-height: 1488
+luminances: array:1486512 [
0 => 221
1 => 221
2 => 222
3 => 222
4 => 222
...
2447 => 181.5
2448 => 181.5
2449 => 181.5
…1484062
]
-dataWidth: 999
-dataHeight: 1488
-left: 0
-top: 0
-gdImage: GdImage {[#1285]() …2}
}
-luminances: []
-buckets: array:32 [
0 => 0
1 => 0
2 => 0
3 => 0
...
29 => 0
30 => 0
31 => 0
]
-source: Zxing\GDLuminanceSource {[#1286](chrome://devtools/content/netmonitor/index.html#sf-dump-990075822-ref21286)}
-matrix: null
}
-matrix: null
}
-reader: Zxing\Qrcode\QRCodeReader {[#1289]()
-decoder: Zxing\Qrcode\Decoder\Decoder {[#1290]()
-rsDecoder: Zxing\Common\Reedsolomon\ReedSolomonDecoder {[#1291]()
-field: Zxing\Common\Reedsolomon\GenericGF {[#1304]() …7}
}
}
}
-result: null
}
Well in debug mode it worked, but it lasted forever to calculateBlackPoints
and calculateThresholdForBlock
. Unfortunately this is unusable :(