Mailing Lists: Apple Mailing Lists

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

Re: how to read images fast with Apple Java?



Bill Janssen wrote:

Wow, so the sips conversion time + bmp load time is still faster than
just loading the PNG?

Not necessarily. You have to try it on your machine, using your image data.


For example, your original post said it took 200 ms to read a 2550x3300 png image. I was never able to even come close to that rate on my 2.0 GHz Core 2 Duo Mac mini.

Also, I used 'sips' to convert some original JPEG images (Canon A95 photos) to PNG, and then tested those PNG images with ImageIO.read (). Since PNG supports a variety of formats and encoding options, it's possible that the combination sips is writing is pessimal for the Java ImageIO reader.

I can't tell you what will be fastest on your machine, because I don't have a 3.0 GHz Xeon, and my tests so far show that CPU clock- speed alone doesn't account for everything. Ultimately, I think you'll have to try several things yourself, possibly using some of the previously posted suggestions, because it's quite possible that the combination of hardware and image data you have will determine exactly which approach is fastest. I don't think there's one universal answer.


I'd somehow thought that on Leopard with 64-bit hardware, the server VM
was always chosen. I'll try this -d64 switch.

Enter the 'java -version' command and observe the output.

Also, server VM and 64-bit refer to different things. There is a 32- bit server VM. There is no client 64-bit VM, though. So, 32-bit has client or server VM, 64-bit only has server VM, and the 'java' command defaults to 32-bit client VM.

  -- GG

_______________________________________________
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.