Hi there,
We’re having a different issue with speed that we have found.
Under the same instance of the running application, every time you use the component, it gets slower and slower each time.
Here is the code I’ve used:
BarCodeReader reader = new BarCodeReader(“PathToFile/Test.tif”, BarCodeReadType.Code128);
long start = System.currentTimeMillis();
reader.setExpectedBarCodeCount(1);
if (reader.read()) {
System.out.println("Barcode Found: " + reader.getCodeText() + " in "
+ (System.currentTimeMillis() - start) + “ms”);
}
reader.close();
These are the results I’m getting after calling that code several iterations:
Barcode Found: 3111243030 in 574ms
Barcode Found: 3111243030 in 437ms
Barcode Found: 3111243030 in 421ms
Barcode Found: 3111243030 in 441ms
Barcode Found: 3111243030 in 479ms
Barcode Found: 3111243030 in 479ms
Barcode Found: 3111243030 in 503ms
Barcode Found: 3111243030 in 546ms
Barcode Found: 3111243030 in 549ms
Barcode Found: 3111243030 in 599ms
Barcode Found: 3111243030 in 621ms
Barcode Found: 3111243030 in 624ms
Barcode Found: 3111243030 in 665ms
Barcode Found: 3111243030 in 688ms
Barcode Found: 3111243030 in 710ms
Barcode Found: 3111243030 in 721ms
Barcode Found: 3111243030 in 774ms
Barcode Found: 3111243030 in 793ms
Barcode Found: 3111243030 in 820ms
Barcode Found: 3111243030 in 843ms
Barcode Found: 3111243030 in 865ms
Barcode Found: 3111243030 in 892ms
Barcode Found: 3111243030 in 918ms
Barcode Found: 3111243030 in 940ms
Barcode Found: 3111243030 in 966ms
Barcode Found: 3111243030 in 996ms
Barcode Found: 3111243030 in 1006ms
Barcode Found: 3111243030 in 1045ms
Barcode Found: 3111243030 in 1055ms
Barcode Found: 3111243030 in 1096ms
Barcode Found: 3111243030 in 1108ms
Barcode Found: 3111243030 in 1150ms
Barcode Found: 3111243030 in 1159ms
Is there something I’m doing wrong to make this happen? If this happens in our live application, in the end, it will take a very long time to find barcodes.
I have attached the Test.tif file I used.
Thanks,
Erik.