My coworker posted this question yesterday: 7-second EF startup time even for tiny DbContext.
After taking his code and moving it to a separate solution to isolate i
The issue is fully reproducible. I have just run it and used dotTrace Performance profiler to collect snapshots for both x86 and x64 executions. I got mostly same times as you report. But there is really no obvious difference between x64 and x86 traces - except the x64 takes at least twice the time of x86 everywhere.
But that was tracing of NUnit test run. By running the same test just as console applications I get times like this:
x86: 0,6864012, 0,0468001
x64: 1,0608019, 0,0468001
That looks much better, doesn't it? There is still difference between x86 and x64 but the x64 code can be slower in general for some operations.
The problem at this point is not about EF but about NUnit and its test runner.
Edit:
I did some more testing. Both NUnit's and Resharper's task runner has this issue but it affects only the very first test. All other tests run quickly. xUnit shows the same behavior.