Speeding up Image generating rate.

"Yossi Baram" <[email protected]>
Newsgroups gmane.comp.krysalis.devel
Message-ID <[email protected]>
hi,
I have a function that creates a barcode image.
 
 
 public boolean setBarcodeImage(String imgStr,int barCodeType,String imageName){
  boolean succeed=true;
  try {
   DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
   Configuration cfg = builder.buildFromFile(new File("barcode-EAN13-cfg.xml"));
   Logger log = new NullLogger();
   BarcodeGenerator gen = BarcodeUtil.getInstance().createBarcodeGenerator( cfg, log );
   OutputStream out = new FileOutputStream(new File(imageName));
    BitmapCanvasProvider provider = new BitmapCanvasProvider(
    out, "image/jpeg", 100, BufferedImage.TYPE_BYTE_GRAY, true);
  
   if(imgStr.equals(null)) 
   {   
     imgStr = "0000000000000";
   }
   gen.generateBarcode(provider, imgStr);
   provider.finish();
  } catch (Exception e) {
   succeed=false;
   System.out.println("Error creating Image: " + e);
  }
  return succeed;
 }
 
My big problem is the speed.
The rate of borcode images generation is 200 for 1 min.
It is very slow(I have ~ 20,000 images and more to create for integrating into a report).
Can I speed up the proccess?
Please advise.
thanks
Yossi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.