Entity Framework 5.0 Performance Test

I am an internship and I was asked to evaluate the performance changes for the new Entity Framework 5.0. I personally have never used the Entity Framework, and I don't have any large database or queries to do the right test.

I did some simple test tricks for .NET 4.5, using LINQ query loops to try to automatically compile Query and see some kind of performance change since I was targeting .NET 4.0, no performance changes were seen .

Is there a performance test already done for the Entity Framework that can show when a new version of Entity Framework has better performance?

thanks

+7
source share
1 answer

A few things:

  • If you want to compare performance changes between .NET 4 and .NET 4.5, you must have two machines, because .NET 4.5 is an in-place upgrade. Installing .NET 4.5 on the machine will โ€œremoveโ€ the ability to run on the old .NET 4.0 (thanks to Microsoft for this nightmare). You can configure the project on .NET 4, but at runtime you will always work on .NET 4.5, if installed.
  • Finding performance improvements can be quite difficult because there is no list of real changes in query generation, but you are interested in two areas:
    • Automatically compiled queries are an automatic feature in EF5 with .NET 4.5. This function should improve subsequent query execution speed - the first execution will still be "slow" or perhaps even "slower" than in .NET 4
    • Optimization in requests for one hierarchy. Usually this should improve queries that target only one type in the inheritance structure, or project only fields from the base object. In .NET 4, this always led to joining all tables for derived objects, even if they were not needed. I have not tried this improvement yet, so I will be happy to read your findings here.
+5
source

All Articles