Philip J Colbert wrote:

Hi all

I have a class that is just basically a extension from an object that
returns
a shape3D.  In this class all I do is set the Ceometry and Coord Index
for a
shape ("Yes I know it is large but I don't see why there is a
problem")  The
geometry is large and has over 1000 points in it!  The runtime error I
get is
below and the line that calls it is just a basic call to a constructor.

In current version of java there is a 64k limit on method side.
Unfortunately, array initialization takes up a lot of space (I'm shocked
that 7 years have passed and we still do not have special constant for
arrays inside classfile).

Anyway, for each array element, you need
aload array
bipush index
ldc2 float_data
fastore

This is 1 + 3 + 3 + 1 = 8 bytes per element. This means that you can
have around 7000 entries in array at most. 1000 points means 3000
coordinates. If you also have colors and indices you can easily go over
7000 limit.

Solution is to load data from external file. It will be probably faster,
less stressing for jit/jvm, easier to modify and you will not have to
worry about method size. Compile time should also get shorter :)

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