We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Component slows down over time

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.

Hi Erik,


Thanks for you inquiry. I tested your provided bar code image with the latest build of Aspose.BarCode for Java 5.3.0. I managed to replicate the problem. Currently, we are in the testing phase of the new release of Aspose.BarCode for Java 5.4.0 and hopefully we will provide you the new release in a few days’ time. I did not observe this problem with Aspose.BarCode for Java 5.4.0. Please spare us a bit more time to complete our testing and publishing process for the new release.

We’re sorry for your inconvenience.