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: Current JAI?



Alexander Spohr <email@hidden> wrote:

>it is is painfully slow when decoding images. the decoders seem to be
>written in java. if i run my app under windows (1.9GHz P4, GeForce 2MX)
>the loader (loading tiff & jpeg + uploading as texture) needs 15
>seconds, my PB 1.5GHz needs around 60 seconds for the same task!

According to this:
<http://developer.apple.com/ReleaseNotes/Java/Java3D_JAI14RN/index.html>

  "In cases where no native function is available,
   the pure Java implementation will be used."

So presumably the TIFF and JPEG decoders aren't native, although there are
other possibilities.

One is that file-buffering is missing or is too small.  I've seen a lack of
buffering cause up to 10X difference in speed.  Hard to say if that's a
problem without diving into the source of JAI.

Another possibility is that the Image's raster format is slow, as distinct
from the actual decoder.  So the decoder could be plenty fast, even native,
but the choice of Image format is the bottleneck.

I suggest profiling the PB.

Even something simple like -Xprof should show you the major contributors.
That would probably tell you whether it was in native code or not, whether
it was the decoder itself or file-buffering, etc.  Once you know what the
problem is, you may find a way to control it, such as with a constructor
arg, a configuration option, or a system property.  Right now, you don't
have enough detail to do anything, or even to know if anything else is
possible.

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