[vtkusers] vtkUnsignedShortArray GetJavaArray() performance
Marco Sambin
m.sambin at gmail.com
Mon Jan 23 07:11:39 EST 2012
Hi all.
I am experiencing some performance issues with the call to
vtkUnsignedShortArray's GetJavaArray() method.
On my PC, this GetJavaArray is taking around 3 milliseconds in case of
a vtkUnsignedShortArray representing a 256x256 image (hence, 65536
elements), while it is taking around 300 milliseconds (!!) in case of
a vtkUnsignedShortArray representing a 512x512 image (hence, 262144
elements).
Is this huge performance difference between 256x256 and 512x512 arrays
to be expected with the GetJavaArray() method?
I understand that here most of the performance penalty may be due to
the Java-to-native crossing related to the JNI mechanism, but why such
a huge difference between the two array sizes?
Thanks in advance for your comments.
Regards,
Marco
More information about the vtkusers
mailing list