Is the first persistance of an Entity Data Model in EF 4.0 slower due to the connection cost ?
- by Scott Davies
Hi,
I've got a console app written that persists an object graph via Entity Framework 4.0. I loop through this to dump the execution times for each persistance. The first persistance is always the largest. Is this due to EF making the initial connection to the database and/or JIT'ing ?
Here's a sample of the output:
Persisted graph in **3318** millseconds.
Persisted graph in 25 millseconds.
Persisted graph in 26 millseconds.
Persisted graph in 22 millseconds.
Thanks,
Scott