LINQ in a child app of AppDomain

Does anyone have an idea why compiling the JIT LINQ expression takes longer in the child AppDomain than in the default AppDomain? Up to 4 times longer.

+4
source share
1 answer

Although without actual profiling I can only make the following assumptions

  • There is a small amount of overhead creating the new AppDomain
  • A child of AppDomain will have to restart all necessary assemblies again.
  • If you then copy the expression back to the parent AppDomain, then you will get serialization.
  • If you pass the compiled lambda method, you will be amazed at the cost of loading the dynamic assembly into the parent AppDomain.
+1
source

All Articles