> Marc, I'd question the benefit of making the images jpeg.  How fast is
> jpeg decoding?  I know jpeg encoding is relatively slow.  This is all
> going to be machine dependent (relative speed of CPU vs Disk system).

JPEG decoding is fast, even in Java. JPEG encoding may be "slow" but it's 
still only a second or so to compress a large image. 

> With a fast disk system and a slow CPU it could be faster to read a much
> larger file that doesn't require any decompression.  Does anyone have
> any real world benchmarking comparisions?
>
> By using a buffered stream he is not reading the file byte by byte, but
> rather buffer by buffer (tweak the size of the buffer for better
> performance - i.e. if your default buffer is 1024 bytes and your
> smallest file is 50K crank that buffer up to 25K or so).

If you're reading all the data byte by byte, even with a buffered reader, 
it will be VERY slow for large files. That's over 3 million calls to 
read() just to load one picture.

Factor in java security checks and method call overheads, and I'm very 
sure you will see a -serious- performance gain with 1 call to read 3MB of 
data vs. 3 million calls to read 1 byte.

Try it and see. I'm going to run the test here... but everything I've 
read in the past supports what I've been saying...

I'll let you know my results.

Marc

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to