Reputation: 24640
My program connects to external code via Runtime.exec(). It is quite fast but the program really spends most time in the Runtime.exec() call (tested with profiler).
At this point there is no choice for a native library, so i am stuck with the Runtime.exec() code.
I'm wondering if there is any way to improve the performance of the external program call from Java or even from the OS that i am not aware of.
Upvotes: 1
Views: 295
Reputation: 19225
Are you sure you're not measuring cumulative time - i.e the exec call duration is the duration of the call itself + the time of the actual functionality you're invoking?
The reason I ask is that I've always find runtime.exec to be pretty performant.
Upvotes: 1