Partager via


Quick tip for large applications using Entity Framework Code-First

Quick tip. When using Entity Framework and its Code-First way of working your code to configure the entities might grow very large. When that's the case, it might be possible to see under a profiler that the JIT'er is taking a large amount of time just to get you started. There are two ways to go about this:

1) The good and hard way: refactor your code to be more compact and simplified. This will help the JIT'er produce code faster and possibly better optimized.

2) The easy way: NGEN your application and its dependencies.

NGEN will compile your assembly and load it with zero JIT cost. This proves to be tremendously useful in cold-startup scenarios.

Comments