You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pasin No. Article suggested to less call from native to java code by passing all values in one JNI call from java to native.
If collator can consolidate the calls from native to java or reduce the number of calls, it will improve the performance. We need to review collator codes.
Java_com_couchbase_cbforest_QueryIterator_next() calls getEnum(env, self) to obtain the pointer of C4QueryEnumerator. In side the getEnum(env, self), it calls env->GetLongField(self, kHandleField); which is JNI call from native to Java code. By passing class pointer from Java to native, we could avoid this JNI call. In case of iterating 100 or 1K docs, we could same number of JNI calls. https://github.com/couchbaselabs/cbforest/blob/master/Java/jni/native_queryIterator.cc#L35
http://www.ibm.com/developerworks/java/library/j-jni/#reaching
Passing class pointer to native could improve performance.
The text was updated successfully, but these errors were encountered: