Appdomain performance benefits versus process?

I have a C # application (foo) from which I am calling another C # application (bar). I am currently invoking the bar application from the foo application, creating a new process using the C # Process class.

I recently learned about .net AppDomains. I would like to know if there is any performance advantage for using AppDomains instead of a process?

Thanks and respect,

+4
source share
2 answers

There is some minor overhead in Windows just by creating a new process, yes. This is why CGI has historically not performed as well on Windows as on other operating systems (and the big reason why FastCGI was developed instead)

However, I would ask how often are you going to create these additional β€œassignments”? If this happens very often, is there a reason why you cannot just use a thread pool thread? If this does not happen often, then the benefits that you get will be negligible compared to the time you spend on figuring out how to make it work.


IMO, individual AppDomains applications have certain situations that require their use during the whole process or a simple stream. It's usually best to go one way or another.

+2
source

Creating a process in the .NET Framework is not a controlled process, the CLR must consult the base OS to initiate a new process, and initiating a new process has some specific steps, so there may be some performance degradation, but there is no measurement.

But if you load your DLL into a new AppDomain, which will be located inside your application process and will not require the installation of the full Flash package.

it depends how you

0
source

Source: https://habr.com/ru/post/1333551/


All Articles