Click here to Skip to main content
16,004,453 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 21:50
satc24-May-15 21:50 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Richard MacCutchan24-May-15 22:15
mveRichard MacCutchan24-May-15 22:15 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 22:49
satc24-May-15 22:49 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Richard MacCutchan24-May-15 23:09
mveRichard MacCutchan24-May-15 23:09 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 23:15
satc24-May-15 23:15 
SuggestionRe: Entity Framework : Too slow when executing the first query Pin
Richard Deeming27-May-15 2:10
mveRichard Deeming27-May-15 2:10 
AnswerRe: Entity Framework : Too slow when executing the first query Pin
Eddy Vluggen24-May-15 23:30
professionalEddy Vluggen24-May-15 23:30 
AnswerRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 3:46
mveDave Kreskowiak25-May-15 3:46 
On top of what everyone else has said, Entity Framework itself has a "warm up time" with the very first query your app makes each time the app is launched. This is where Entity Framework is going through the entity classes and compares the structure against the database to make sure nothing changed. Obviously, this takes time.

If you really wanted to compare apples to apples, you have to get Entity Framework to make a different query first, one where you're going to throw the results away, just to get EF through its warm up time.

The only catch, EF6 has a pretty short warm up time, a few seconds for most models.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 6:34
satc25-May-15 6:34 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 6:37
mveDave Kreskowiak25-May-15 6:37 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 6:49
satc25-May-15 6:49 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 8:04
mveDave Kreskowiak25-May-15 8:04 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 8:15
satc25-May-15 8:15 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 13:05
professionalMycroft Holmes25-May-15 13:05 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Sascha Lefèvre25-May-15 15:12
professionalSascha Lefèvre25-May-15 15:12 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 15:45
professionalMycroft Holmes25-May-15 15:45 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 16:16
mveDave Kreskowiak25-May-15 16:16 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 17:03
professionalMycroft Holmes25-May-15 17:03 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 17:30
satc25-May-15 17:30 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 19:43
professionalMycroft Holmes25-May-15 19:43 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 20:03
satc25-May-15 20:03 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Sascha Lefèvre25-May-15 17:50
professionalSascha Lefèvre25-May-15 17:50 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 19:38
professionalMycroft Holmes25-May-15 19:38 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 19:42
satc25-May-15 19:42 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 19:46
professionalMycroft Holmes25-May-15 19:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.