Answer the question
In order to leave comments, you need to log in
LINQ in a new application domain (AppDomain)
Does anyone have any idea why JIT compilation of the same LINQ query takes 4 times longer in the new domain (child AppDomain) than in the main (default AppDomain)?
Answer the question
In order to leave comments, you need to log in
Could you send an example of your code?
I conducted such an experiment ( here is just the code ).
Launched the program twice. Once called a loop with the creation of a class instance in the usual way.
The second time is by loading from an external assembly and running in a new domain.
The results are:
Hamster: 50000
Domain hamster: 00:00:00, Hamster: 00:00:23.5093447
Domain hamster: 50000
Domain hamster: 00:00:26.9815433, Hamster: 00:00:00.0010000
That is 00:00:23.5093447 and 00:00:26.9815433. For a loop of 50,000 repetitions, the difference is about 3 seconds. Of course there is a difference, but not 4 times, and even with such a number of repetitions, most likely the numbers would differ much more?
Perhaps you have a more complex linq query? It has become very interesting to understand.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question