ch.vorburger.exec
ch.vorburger.exec copied to clipboard
Performance issue
The wait(100) in ch.vorburger.exec.ManagedProcess.startExecute() isn't great.
Wouldn't some sort of yield() (:question:) suffice?
@mosesn if you have any great idea how we could avoid this, go for (PR) it! I'm not entirely sure if #126 (alone) makes this unnecessary, now.
Just to confirm, all we want to do is wait for asyncResult to complete for up to 100ms? Reading the logic I'm a bit confused–it seems like the logic is:
- wait for 100ms
- if the process threw an exception, bail out
- however, if the process started successfully OR if the process has not yet started, set the watchdog value
Do we want to preserve that behavior? or would we want to change it so that it bails out if it hasn't started within 100ms? Regardless, yes, this should be pretty easy to optimize.