Performance of Linq To SQL versus Entity Framework

entity-framework linq-to-sql performance stored-procedures

Question

I looked for current performance tests comparing L2S with EF, but I couldn't locate any that examined invoking stored procedures using the publicly available version of EF. So I conducted some of my own experiments and discovered some intriguing findings.

Do these outcomes seem accurate? Should I do more testing on it?

One call to the sproc, one instance of the context: (Link is defunct)

Multiple calls to the same sproc from a single instance of the context (Link is defunct)

Multiple occurrences of the context, different sproc calls: (Link is defunct)

1
15
7/9/2013 12:58:44 AM

Accepted Answer

To tell apart starting up expenses versus running costs, I believe you need test it slightly differently. The Entity Framework, in particular, has substantial initial expenses brought on by the need to create database views (although you can do this in advance). In the same way, LINQ provides the concept of a assembled inquiry, which is suitable for repeated query execution.

The cost of query execution will often be more significant than the cost of starting for many applications. The reverse could apply to certain people. I believe it's crucial to differentiate between them as their performance characteristics vary. In example, it is inaccurate to include starting charges into the average cost of a query that is run frequently.

7
11/3/2008 2:37:21 PM

Popular Answer

This seems to be a nice comparison between LINQ to SQL vs Entity Framework's performance.

http://toomanylayers.blogspot.com/2009/01/entity-framework-and-linq-to-sql.html



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow