Does this 'per AppDomain indirection' work if use two AppDomains in Windows Forms application and use LoaderOptimization.SingleDomain
Does this indirection work is there are no shared assemblies among domains (except corlib)?
This optimization applies only when we don't generate domain neutral code
(i.e. code that can be used in multiple appdomains). When we generate
domain neutral code, the same code needs to execute in multiple appdomains,
which means that the specific statics that it accesses can be different
depending on the appdomain that it executing in.
When using LoaderOptimization.SingleDomain, the CLR will JIT multiple
copies of the code, and so each one will be optimized for the static
accesses of its specific appdomain. Ofcourse the cost you are trading off
here is having multiple copies of the code.
As with anything else, I encourage you to measure your specific scenarios
to understand the sources of overhead and areas to focus on.
-- Ori.
--------------------
>Thread-Topic: memory location of static variables?
>thread-index: AcPv+Cy0jbqI3CiaQHSqrn+dm9W+Ug==
>X-Tomcat-NG: microsoft.public.dotnet.framework.performance
>From: =?Utf-8?B?RG1pdHJ5IEtvc3Rlbmtv?=
<anonymous@discussions.microsoft.com>
>References: <9527b23b.0401182151.7a3dd145@posting.google.com>
<#0btnXy3DHA.3416@tk2msftngp13.phx.gbl>
>Subject: Re: memory location of static variables?
>Date: Tue, 10 Feb 2004 09:06:07 -0800
[quoted text clipped - 12 lines]
>Path: cpmsftngxa07.phx.gbl
>Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.performance:6615
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.performance
>
>Does this 'per AppDomain indirection' work if use two AppDomains in Windows Forms application and use LoaderOptimization.SingleDomain?
Does this indirection work is there are no shared assemblies among domains
(except corlib)?

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.