]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid virtual function dispatch overhead
authorPo Lu <luangruo@yahoo.com>
Tue, 5 Sep 2023 02:43:07 +0000 (10:43 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 5 Sep 2023 02:43:07 +0000 (10:43 +0800)
* src/androidvfs.c (android_saf_move_document): Circumvent JNI
dynamic function dispatch on call to final method.

src/androidvfs.c

index e8777892bd3c77c64613ea274ad235a338e1e1c7..858816908f8c7edcf20d8202af7c37bd8fcde60c 100644 (file)
@@ -4410,11 +4410,13 @@ android_saf_move_document (const char *uri, char **doc_id,
 
   /* Do the rename.  */
   method = service_class.move_document;
-  result = (*android_java_env)->CallObjectMethod (android_java_env,
-                                                 emacs_service,
-                                                 method, uri1,
-                                                 doc_id1, dir_name1,
-                                                 dst_id1, src_id1);
+  result
+    = (*android_java_env)->CallNonvirtualObjectMethod (android_java_env,
+                                                      emacs_service,
+                                                      service_class.class,
+                                                      method, uri1,
+                                                      doc_id1, dir_name1,
+                                                      dst_id1, src_id1);
   if (android_saf_exception_check (5, src_id1, dst_id1, dir_name1,
                                   doc_id1, uri1))
     {