Forum

Author Topic: JAVA API compared to GUI  (Read 1517 times)

SDUIVM

  • Newbie
  • *
  • Posts: 7
    • View Profile
JAVA API compared to GUI
« on: September 22, 2022, 11:17:32 AM »
Hi Everyone,

I am doing some test to use the JAVA API instead of the GUI.
However I found the JAVA API very slow compared to the GUI, I tried to get the dense cloud of 12 images and it takes 4 seconds with the GUI and 23 seconds with the JAVA API.

When I check the log I can see that both approach are using the GPU properly but at the camera optimization step the api is much slower.

Is it possible that the java api is slower than the GUI ?

Thank you very much for your help,

Stan


PolarNick

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: JAVA API compared to GUI
« Reply #1 on: September 27, 2022, 01:10:24 PM »
Hi, how do you measure processing timings for Java API?

Maybe 23 seconds - including JVM initialization + library classes loading + metashape native libraries (.so) loading?

If you will do the same processing but ten times in for-loop, what time will it take? 23*10 seconds or 23+3*9 seconds?

SDUIVM

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: JAVA API compared to GUI
« Reply #2 on: September 27, 2022, 06:19:24 PM »
Hi,

Thank you very much for your answer. I measure the time within the JAVA script just before the AddPhotos method and just after exporting the points.
So I will get 23*10 with the JAVA API.
I moved to the Python API and I don't have this issue.

Best,