Six seconds warmup time for the first entity framework 6 nonquery

Viewed 3785

From my integration test:

// Act
Stopwatch w = new Stopwatch();
w.Start();
userService.Create(userDTO);
w.Stop();


public void Create(UserDTO userDTO)
{
    var user = userDTO.ToEntity();
    _context.Entry(user).State = EntityState.Added;
    _context.SaveChanges();
}

6,2 seconds to do an "sql insert" is crazy. I already see the application users complaining when they first open a project which they use the whole year. So everyday they have to wait 6 seconds...

I thought the warm up time in EF6 has improved?

Is there anything I can do to improve this miserable behavior?

4 Answers
Related