Nasos,
If you're using the default subdivision in the Sphere class,
160M for 2000 spheres with identical appearance is way too much. I did
a quick test program, and here is the result :
Number of Spheres (with subdivision 15) = 2000 spheres .
Total amount of memory taken up :
mem used - before: 10966k after: 10190k
mem used - before: 10190k after: 10191k
mem used - before: 10191k after: 10192k
mem used - before: 10192k after: 10193k
mem used - before: 10194k after: 10190k
mem used - before: 10190k after: 10190k
mem used - before: 10190k after: 10190k
It should be slightly more than 10M. I did nothing special, except
all spheres share the same Appearance object. Also please note all
spheres share the same geometry object.
* By default all primitives with the same parameters share their
* geometry (e.g., you can have 50 shperes in your scene, but the
* geometry is stored only once).
thanks,
- Chien Yang
Java 3D Team.
> Delivered-To: [EMAIL PROTECTED]
> X-Accept-Language: en
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Mon, 10 Dec 2001 17:12:07 +0200
> From: Mantes Athanasios <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Memory Optimization
> To: [EMAIL PROTECTED]
>
> Hi there!
>
> I'm new to java3D and I want to create an application which will show
> 2000 identical in appearance sphere objects with various scales and
> positions. I have managed to see my 2K spheres, but my application
> consumes almost 160MB of memory. How can I make my application use
> significantly less memory and run faster? Is the amount of memory
> consumed normal for so many objects ?
>
> Thanks
> Nasos
>
> ===========================================================================
> 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".