The capture times does seem a little slow. The capture process at 1.6 zoom will take a bit longer as the buffer creation time can really add up, but I have to say is quite a bit better in JDK 1.7 then previous releases. You can use multiple threads but you'll want to start each tiffGen.turboConverter() in its own thread. Even with your i5 I probably wouldn't recommend any more then four threads for a ThreadPoolExecutor.
I did a quick review of the code and made some notes listed below.
- to save a little memory in turboConverter() consider remove the image in favour of a single BufferedImage and then you can image.dispose() to free up further memory.
- I did some profiling for a client a while ago and if I remember correctly the ImageIO.getImageWritersByFormatName() is fairly expensive. You might want to do this setup only one an reuse the object.
Configuration paramaters and code that might help seed the batch process up.
- The the FontManager is loaded, it scans the system for fonts which can be quite time consuming, consider make the following code to cache the results between runs.
ResourceBundle messageBundle = ResourceBundle.getBundle(
Properties sysProps = System.getProperties();
PropertiesManager propertiesManager = new PropertiesManager(sysProps, messageBundle);
new FontPropertiesManager(propertiesManager, sysProps, messageBundle);
- here is a list of system properties that can also help speed up the process.
// a few system properties that should be enabled
// set the graphic rendering hints for speed, we loose quite a bit of
// when converting to TIFF, so no point painting with the extra quality