Attached patch increases DataContext() instantion speed for large
DataContexts.
OK to commit ?

Andrus.

More info:

I found  in DataContex.cs Init() method GetModel() call is very slow for big
DataContext:

Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
Mapping = mappingSource.GetModel(GetType());
stopWatch.Stop();
Debug.Write(stopWatch.Elapsed.ToString());

Outputs times

00:00:01.4944893
00:00:00.8878247
00:00:00.8864646
00:00:00.8761056 ....

Andrus.


Code used for this testing:

 for (int i = 0; i < 5; i++)
  using ( var db = new Entity( conn ))  {
       }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: datacontextinstantionspeedincrease.patch
Description: Binary data

Reply via email to