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.
source share