I have an application that is receiving image data and I am trying to paint the data as fast as I receive it.
Currently I am doing this by creating a single 125 line renderedImage and using a System.arraycopy() to put new image blocks into the ri.
System.arraycopy(newData, 0, riData, 0, riData.length);
g2.drawRenderedImage(ri, AffineTransform.getTranslateInstance(0, ty));
paintImmediately(x, y, w, h);
If it matters the image blocks are being painted from top to bottom. Also, my image is being scaled down to fit the image area I have on the screen (not full screen).
My problem is that currently I am able to receive data at a rate faster than 1 line/ms, but it takes another 4 ms/line to paint it. Does anyone have any suggestions on how to do this faster? I am using blocks of data because I thought it would take less time to display than doing each line, but is still slow. This is running on a Blade 150 running Solaris 8 w java 1.4.1-b21. Thanks for any hints, suggestions or pointers.