ros2_java icon indicating copy to clipboard operation
ros2_java copied to clipboard

Performance issue for using List in JNI

Open pluris opened this issue 5 years ago • 2 comments

I was using ros2 java and noticed that the performance was very slow in List.

When communicating with ros2 native, there is a serious performance difference in ros2java side. So, I compared the performance by creating a Android JNI project.

  • Array TIME : 17.532115(ms)
  • List TIME : 1419.957922(ms)

How about using Array instead of List? The usability is not good, but the difference in performance is significant, so I suggest.

Need some more modifications, but to me it also has an improved code.

pluris avatar Nov 20 '20 05:11 pluris

We have a fix https://github.com/ros2-java/ros2_java/pull/165 that will land on main as we start porting changes from our fork.

jacobperron avatar Nov 13 '21 01:11 jacobperron

@jacobperron I'm sorry. I see too late because didn't follow up this. I think #165 is a great job.

pluris avatar May 19 '22 08:05 pluris