Hello, after the change from 2.5 to 22.6 the detection of Code39 is 3x slower than before.
Is there anything that can be optimized?
Qualitty Setting I have already set to QualitySettings.getHighPerformance().
Grüße
Dennis
Hello, after the change from 2.5 to 22.6 the detection of Code39 is 3x slower than before.
Is there anything that can be optimized?
Qualitty Setting I have already set to QualitySettings.getHighPerformance().
Grüße
Dennis
Could you please share barcode image and paste sample code that you are using to reproduce the performance issue, we will check your issue soon.
Hi, attached the example and the code
test.jpg (13.2 KB)
Version 22.6
BufferedImage image = ImageIO.read(new File("./test.jpg"));
final BarCodeReader reader = new BarCodeReader(image,
SupportedBarcode.getBarcodeType(SupportedBarcode.Code39Standard));
try {
reader.setQualitySettings(QualitySettings.getHighPerformance());
for (BarCodeResult erg : reader.readBarCodes()) {
System.out.println("CODE " + erg.getCodeType());
System.out.println("CODE WRT " + erg.getCodeText());
}
} finally {
if (reader != null)
reader.dispose();
}
2.5
BufferedImage image = ImageIO.read(new File(".test.jpg"));
final BarCodeReader reader = new BarCodeReader(image, SupportedBarcode.getBarcodeType(SupportedBarcode.Code39Standard));
try {
while (reader.read()) {
System.out.println("CODE " + reader.getReadType());
System.out.println("CODE WRT " + reader.getCodeText());
}
} finally {
if (reader != null)
reader.close();
}
Grüße
Dennis
I did test your scenario/case using Aspose.BarCode for Java 22.6 with your barcode image using the following sample code:
e.g.
Sample code:
long previousTime = System.currentTimeMillis();
BarCodeReader reader = new BarCodeReader("f:\\files\\test.jpg", DecodeType.CODE_39_STANDARD);
reader.setQualitySettings(QualitySettings.getHighPerformance());
for (BarCodeResult erg : reader.readBarCodes()) {
System.out.println("CODE " + erg.getCodeType());
System.out.println("CODE WRT " + erg.getCodeText());
}
long currentTime = System.currentTimeMillis();
double elapsedTime = (currentTime - previousTime) / 1000.0;
System.out.println("Time in seconds : " + elapsedTime);
I found it took 2 seconds to complete the process (detect and retrieve the barcode type and text). I think this is normal. How much time is taken when using Aspose.BarCode for Java 22.6 on your end? Also, how much time is taken when using Aspose.BarCode for Java 22.5?
Hi, here are the values
Aspose.BarCode for Java 2.5 0,9s
Aspose.BarCode for Java 22.6 3.0s
Grüße
Dennis
Thanks for the results.
Please notice, I have logged a ticket with an id “BARCODEJAVA-1435” for your issue. We will look into the details to evaluate the performance comparing older version 2.5 with newer versions. Once we have an update on it, we will let you know.
We are aware of this issue. The issue with performance will be fixed and performance will be improved in release 22.9
Great, thanks for the quick help.
Is there an approximate release date for version 22.9?
Grüße
Dennis
You may expect the release in second half of September 2022. The date is not final as we publish releases once ready.
Please try our latest version/fix:, e.g., Aspose.BarCode for Java 24.4.
Let us know your feedback.