Process.Start taking a long time, the FIRST time only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the Process class to run an external application from my
application. The first time I call the .Start() method it takes several
seconds for the process to actually start. Subsequent calls to .Start() go
very fast as is how I would expect it. Has anyone seen this before and
perhaps found a workaround? Thanks

Alex
 
Starting another .Net application, by any chance? If you are, it needs to be
jitted the first time it's run, just like the application you're starting it
from.

Tom Dacon
Dacon Software Consulting
 
Actually, this only seems to happen if the process I am trying to start
does not exist, but it still only happens the first time I try and run
the process. As I said before, it runs very quickly the rest of the
time. Is there something that the underlying CreateProcess call does
that caches that information somehow?
 
Back
Top