Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ImageIO Performance



Hello. I have a Java 6 application that needs to run on Mac G5's (10.4.9 Using the Developer Preview 6). Everything seems to work fine - The only issue I'm having is that image loading performance is ridiculously slow.
I'm loading PNG images (no more than 1024x1024) from a byte array. On windows this takes around 70-80 ms. On mac, the same code takes 2.5-3 seconds. I've spent multiple hours browsing through mailing lists and have tried multiple solutions. Here is my current loading code:

[code]
PNGImageReader reader = new PNGImageReader( null );
reader.setInput( new MemoryCacheImageInputStream( new ByteArrayInputStream( previewImageData ) ) );
                  
BufferedImage img = new BufferedImage( reader.getWidth( 0 ), reader.getHeight( 0 ), BufferedImage.TYPE_INT_ARGB_PRE );
                   
ImageReadParam param = new ImageReadParam();
param.setDestination( img );     
                   
reader.read ( 0, param );
[/code]

If anyone has an idea or suggestion, I'm desperate for help. Could this poor performance be a result of using the developer preview? If I ported my application to java 5 would performance increase significantly?

Thanks for your help,
Jeff
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.