The programs are exactly the same with left-to-right parity, left in Python and right in Java. From my machine, Python runs 1.0 seconds whereas Java runs with 5.5 seconds on average.
Is it indicative of performance issue for Java counterpart, and is there any solution out there?
If you look at the code in src/main/java/com/kaltura/client/ClientBase.java, you’ll see that calling
generateSession() does not actually result in an API request to the Kaltura endpoint. The KS is generated on your local machine. Whereas, in your Python example, you are calling the
session.start() API action.
You could do the same with the Java client but either way, I’d recommend you use
generateSessionV2() also defined in the same file.