开发者

Improve Runtime.exec()

开发者 https://www.devze.com 2023-01-07 04:12 出处:网络
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).

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消