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: BufferedImages not garbage collected -- any suggestions?



Hi Jerry, 

I hope this is not under NDA:
You may want to try your application with the latest developer release of
J2SE 5 for Mac OS X.  You can set a system property which allows choosing
between the Quartz rendering engine and a software rendering engine implemented
by Sun.
The performance characteristics are quite different between the two engines.

In case the above shouldn't work out for you, I have started experimenting
with doing all the painting in a software rendering engine implement by myself.
The performance is surprisingly good when compared with the Java2D renderer
which comes with the JVM. 
It beats the Java2D line drawing code on the Mac and is only slightly slower
than the area filling code.
On the PC, depending on the graphics card in use, it is slower than the Java2D
code or at par for non-antialiased and opaque rendering. For translucent
and antialiased rendering it performs very good.
It shouldn't be too hard, to change your application, so that it alternatively
creates a BufferedImage which uses Java2D, or one which uses the software
renderer.

Experimental Software rendering code:
http://www.randelshofer.ch/oop/graphics/

(Lenghty) discussion about it at javalobby.org:
http://www.javalobby.org/java/forums/t65204.html


-Werner

>Experimentation shows that there is some acceleration (or  
>deceleration) going on: take a BufferedImage, draw it to the screen a  
>few hundred times. Now call getDataBuffer or setRGB once and watch  
>the drawing speed plummet for ever after. I have a painting/image  
>processing application and the entire code is warped around the fact  
>that I have to do image processing without ever calling any of the  
>methods which allow me to access a BufferedImage's pixels to avoid  
>everything slowing down drastically. In fact, Windows is far better  
>than the Mac in this regard (don't know about Linux) as the JVM does  
>'clever things' behind the scenes, but I've not been told what the  
>clever things are and why they don't work on the Mac.

 _______________________________________________
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

References: 
 >Re: BufferedImages not garbage collected -- any suggestions? (From: Jerry <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.