efficency of jni method call?

hello!

i am new with jni, and my english is poor also, hope somebody know what i have said.

recently, i am developing a gis application with jni, the spatial data is processed with c++, i use java to get data and draw shapes by calling jni methods, but i find it's very slow when drawing. by the way, i fetch data of every shape dynamicly by calling jni methods when drawing. so i want to know if it is inefficient when calling jni methods so frequently, especially in huge loop?

thanks!

[520 byte] By [angelswingadama] at [2007-10-3 10:38:44]
# 1

c/c++ program is much faster than java but if the implementation is possible in java then avoid

jni which is very error prone and not be supported on every platform. U need to write the c/c++ code for win/linux...separately. Todays computers are fast enough ,there will not be much difference in speed.

AmitavaDeya at 2007-7-15 6:02:45 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
the reason i use jni is that the module written by c++ is working very well and it would be a huge work to rewrite with java, but the efficency of jni make me so disappointed.
angelswingadama at 2007-7-15 6:02:45 > top of Java-index,Java HotSpot Virtual Machine,Specifications...