Nitin.Jain wrote:

> I saw the Sphere code in the repository but it seems this sphere doesn't
> share the geometry, in that case it will eat up huge amount of memory for
> each instance. Anyway I'll try this.

Even if it is a case, you can take out geometry by hand. It can be done
currently I think, in case of problems, modify it a bit.

> Could you give me some pointers on optimization. I'm creating only one
> Shape3D and using them with Link. The Tranform3D which is assigend is also
> created only once.

I was thinking that you were doing certain mistake, but after looking at
code again it is not there. So only part now is to not use standard
Sphere with quite costly GeometryData - but I don't know if it will
create noticeable difference.


>>            percent         live       alloc'ed  stack class
>>   rank   self  accum    bytes objs   bytes objs trace name
>>
>>     94  0.11% 87.51%    20016    1 50080000 5000 10593
>>javax.media.j3d.CachedTargets
>>     95  0.11% 87.62%    20016    1 50079984 4999 10601
>
>
> I never got this "CachedTargets" object in my profiler, can you tell me
> which profiler are you using?

-Xrunhprof:heap=sites,depth=20

:)


> I couldn't quite get it...what do you mean by non-array object.

int[] i = new int[100000];
takes up 400kb. No problem. But if you want to create normal (non-array
object) which will take up so much memory, you would have to add 100000
fields by hand... So if any object takes up 20kb, I'm suspecting some
mistake in profiler (either plain error or Hotspot inlines some array
data at end of object - is this possible ?)

Artur

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