Note that there are some explanatory texts on larger screens.

plurals
  1. POProcess.Start slow when spawning more new processes
    primarykey
    data
    text
    <p>Processes launched via <code>Process.Start</code> seems to have around a 26-second delay when the spawned process (the "child") launches more new processes (the "grandchildren") - I'm trying to find a way to solve this issue. Specifically, this is occurring when the original process (the "parent") is an ASP.Net website or a Windows Service (tried both). </p> <p>We're attempting to run a server-side command-line tool to gather information, make modifications in the file system, and continue with other processes when the "child" is finished. When creating the "child" directly via command-line, there is no delay, and with certain command-line parameters, the "child" does not spawn new processes, and there is no delay. However, with other parameters, the "child" spawns "grandchildren" (the same executable as itself, but we can't modify its code) and seems to have a 25-30 second (usually 26 seconds) delay before the first process is started, and then runs normally.</p> <p>I've tried modifying the <code>UseShellExecute</code> property, the <code>CreateNoWindow</code> property, and the <code>WindowStyle</code> property, to no effect. <code>ErrorDialog</code> and the <code>RedirectStandard*</code> properties are false.</p> <p>The code I'm using is as follows:</p> <pre><code>using (Process p = new Process()) { p.StartInfo = new ProcessStartInfo(exePath, args) { WorkingDirectory = workingDirectory, UseShellExecute = true, CreateNoWindow = true, }; p.Start(); p.WaitForExit(); } </code></pre> <p>Oh, I don't think it matters as I've seen the issue referenced elsewhere (but no solutions), but the exePath I'm using points to msysgit's git.exe.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload