very slow jni code callbacks
Herman ten Brugge
Mon Sep 28 19:47:00 GMT 2009
On 09/28/09 21:01, Tom Tromey wrote:
> Andrew> This calls _Jv_GetTypesFromSignature, which in turn iterates though
> Andrew> all the class loaders looking up the types of all the arguments.
> Andrew> But as far as I can see this is a pointless waste of time: the only
> Andrew> use of the type of each argument is to determine whether it's a
> Andrew> primitive type or not, and we could certainly have done that when
> Andrew> we created the jmethodID.
> Yeah, this could use some improvement.
> Even a variant of _Jv_GetTypesFromSignature that did less work would
I did try some older gcc releases because I once had good
results for callbacks.
The 4.1.2 release shows some different results.
# open jdk gcj
# no_jni 1.48 12.12 ( 8 times slower)
# jni 66.70 200.93 ( 3 times slower)
So there must be a change some time ago that made this
More information about the Java