How to optimize an asp.net spawning a new process for each request?
<p>I have an asp.net mvc application that spawns a <code>Process</code> as follows:</p>

<pre><code>        Process p = new Process();

        p.EnableRaisingEvents = true;
        p.Exited += new EventHandler(p_Exited);

        p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
        p.StartInfo.WorkingDirectory = dir;

        p.StartInfo.UseShellExecute = false;
        p.StartInfo.FileName = "pdflatex.exe";

        p.StartInfo.LoadUserProfile = true;

        p.Start();
        p.WaitForExit();
</code></pre>

<p>Before going further, I need to know whether, e.g., <code>pdflatex.exe</code> is a managed code or a native code?</p>

<h2>Edit 1</h2>

<p>I need to consider this because: (Hopely I am not wrong...)</p>

<ol>
<li>Each Asp.net application runs in an separate/isolated AppDomain as opposed to a separate/isolated process.</li>
<li>A native executable cannot live in an AppDomain.</li>
</ol>

<p>to be continued...</p>

<p>Shortly speaking, I hope my site does not spawn a new process for each request. Because a process is more expensive than an application domain.</p>

<h2>Edit 2</h2>

<p>My asp.net mvc application allows users to submit <code>LaTeX</code> input commands such as <code>$ax^2+bx+c=0$</code> to be converted to a pdf file rendering an quadratic equation. Behind the scene, this web app will spawn a process executing <code>pdflatex.exe</code>. The job of <code>pdflatex.exe</code> is converting the <code>LaTeX</code> input commands to pdf document.</p>
