I'm assuming you're talking about remoting here. Its true a remoting call into another AppDomain in the same process doesn't require a process context switch and also saves some of the overhead of copying the serialized data from one place to another. However, I'm guessing the savings of this is dwarfed by the overhead of the rest of the remoting process (eg. serialization).
Chris Brumme (CLR team) has indicated [1] that cross AppDomain remoting could be significantly optimized, and that we can expect to see some of this optimization in Whidby. As for scalability, there is definately less memory footprint to using multiple AppDomains in one process than using seperate processes. Within one process, the CLR can share a lot of data between AppDomains (see [2]). The main advantage of inter-process remoting is that you aren't tied to a machine boundary. I'd suggest you design your application so that it would be trivial to switch between cross AppDomain and inter-process remoting. Then you can use multiple AppDomains in one process now, but can easily switch to distributing the work between multiple machines later. In either scenario you should try to keep your remoting interface "chunky" (not "chatty") so that you're not spending 90% of your CPU time in remoting overhead. Rick [1] http://blogs.gotdotnet.com/cbrumme/permalink.aspx/24e9e5f5-9923-4cf9-b097-9c018c69d5cb (6th paragraph of the 'common stub' section) [2] http://blogs.gotdotnet.com/cbrumme/permalink.aspx/56dd7611-a199-4a1f-adae-6fac4019f11b ----- Original Message ----- From: "wycklk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 30, 2003 12:39 AM Subject: AppDomain vs Process: which is faster ? > According to Microsoft, threads can execute across AppDomains without > the overhead associated with inter-process communication and process > context switch (vs thread context switch). > > I did an experiment to verify the above. However, I found there is no > obvious performance gain when I use 2 AppDomains within one process vs > 2 separate process. > > My focus here is on performance and scalability > > Anybody can share his experience ? >