I've got an application which has to read 2550x3300 24-bit PNG images
into BufferedImages in Java, on OS X 10.5, and I'm wondering what the
advice of the community is on how to most quickly read each image.
Currently, I just call ImageIO.read() and let Apple's code "just do
the
right thing". Is that smart? It seems to take 200ms or so to do this
on a 3GHz Xeon. Is there some hardware-accelerated path I should be
using (without writing Objective-C code, please)?
Who is the target audience for the software?
What task do you have to perform on the images after reading them in?
Is reading the images known to be the slowest part of the overall task?
Does the non-reading part of the task need the full 2550x3300
resolution?
Are the PNG images compressed or not? Where are they read from?
What are the memory constraints? The I/O speed constraints?
2550 * 3300 * 4 (@INT_ARGB) = 32.1 MB per BufferedImage.
32.1 MB @ 200 ms = 160.5 MB/sec.
Without any other information, the first thing I'd think about is
going parallel and pipelined in a thread-per-processor producer/
consumer model. It'll eat memory pretty quickly, even if you limit
the queue size and the number of parallel threads, but that's a small
matter of time/space tradeoffs. You can always throw money at it
(buy more memory).
-- 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