Q:

Performance benefits of Appdomain vs process?

I have an C# application (foo) from which I am calling another C# application (bar). Currently I am invoking bar application from foo application by creating new process using Process class of C#.
Recently I came to know about .net AppDomains. I would like to know is there any performance benefit for using AppDomains instead of process?
Thanks and Regards,

A:

There is some non-insignificant overhead in Windows of simply creating a new process, yes. This is why CGI has historically not performed as well on Windows as on other operating systems (and a big reason why FastCGI was developed instead)
However, I would ask how frequently are you going to be creating these extra 'jobs'? If it's going to be very frequent, is there a reason you can't simply use a thread pool thread? If it's not going to be frequent at all, the benefit you would gain would be minor compared to the time you will spend figuring out how to get it to work.

IMO, separate AppDomains tend to have some specific situations that call for their use over a full process or a simple thread. It's usually better to go one way or the other.

