Thanks for the suggestions. 1. I am not doing any mipmapping. I leave that to the underlying system.
2. I am measuring memory use before and after garbage collection. However, I am concerned about the peak size of the application. (Some memory is available after items go out of scope/reach.) 3. I have been looking at the source for the loader. I passed along some of these comments so that whoever is maintaining the loader might include the ".dispose()" and ".flush()" calls to help keep memory use under control. 4. :-( I am beginning to think that is what I will need to do. However, I am not sure if much of the extra memory is being consumed there. I suspect that a lot of it is used in the initial image loading. Again, thanks for the response. ----- Original Message ----- From: "Yazel, David J." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2002 8:22 AM Subject: Re: [JAVA3D] Textures and memory consumption | Couple of things: | | 1. If you are mipmapping then there will be increased memory usage. | 2. Stupid suggestions, but make sure you are measuring memory after you have | garbage collected. | 3. The source for the loader is available un the util jar if you want to | improve it. | 4. If you are doing all that work, why not skip the texture loader and skip | right to building the texture and image components yourself? All it does | for you is make mipmaps, and not very good ones at a that. | | Dave Yazel | | -----Original Message----- | From: Tom Lanning [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, February 20, 2002 8:04 AM | To: [EMAIL PROTECTED] | Subject: [JAVA3D] Textures and memory consumption | | | I am developing an application that uses a lot of large (512x512) textures. | If I use something like TextureLoader and let it load the images I end up | with consuming over 300M of memory ... much more than the size of the | textures. I can reduce the memory by loading the images myself, | transforming them to a "power of 2" size, dispose the graphics context, | flush the image, and pass a BufferedImage to the TextureLoader constructor. | It sounds to me that TextureLoader is not disposing the Graphics2D and not | flushing any images it loads. However, even with all this extra stuff, the | size of the application is much larger than it should be. Is there anything | else I can do to reduce the memory consumption without reducing the texture | size? | | I am using the DirectX release version of J3D and JDK1.3. | | =========================================================================== | 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". | | =========================================================================== | 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". =========================================================================== 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".