Recognition Failure takes lots of time

Jan 20, 2011 at 12:52 PM
Edited Jan 20, 2011 at 12:53 PM

Hi, first: BIG THANKS. You help lots of people.

Have you noticed that recognize a failure takes quite a long time (first is thrown lots of exception)? Is there an error only on my site? Have you any tips how to make it shorter?

And what about performance in real device? Is good? I'm testing now only on emulator.

Jan 21, 2011 at 7:41 PM

ZXing will throw a ReaderException whenever it cannot detect a barcode image. Some of the scan modes such as "UPC or EAN" are made up of multiple readers, so the library will throw an exception for each failed reader attempt. If all of the readers fail then the ProcessImage() method of the WP7Manager class will capture the exception and embed it in a more friendly error message.

On my HTC Surround the scanning process usually takes less than 1 second for success or failure. The emulator is running in debug mode, so the exceptions take longer to process. If you are using a slower machine or have limited memory this might also affect the performance. You can decrease the scan time by selecting the specific barcode type you want to scan (ex: use UPC-A instead of the "UPC or EAN" multi-reader), however please note that the UPC-A, UPC-E, EAN-8, and EAN-13 do not work as well individually as the combined "UPC or EAN" multi-reader.