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 it as much as possible, I found that the containing project's platform target had a profound affect on the runtime of the EF startup process.
When targeting x64, I saw that the test took ~7 seconds to spin up the first DbContext and <1 second to spin up the second DbContext (consistent with my coworker's findings who is also targeting x64). However when I switched the platform target to x86, the first DbContext spin up time was reduced by about 4 seconds down to 3.34633 seconds while the second DbContext took the same amount of time as the x64 case.
Given this, it appears the Entity Framework is going through a much different initialization process when targeting a 64-bit system vs 32-bit system. Does anyone have any insight into what is going on under the hood to explain this?