When I enable Hangfire in my web application and I try to debug it, the operation becomes frustrating. Pressing F10 I have to wait 2-5 seconds to perform a single step-over. It doesn’t matter what class I’m debugging, the whole application seems doing something in background slowing it.
If I disable Hangfire all returns to work normally. I tested it also in a blank web app.
Is it a known behavior? What I miss?
From the inverse perspective, I noted how much slower Enqueueing is when debugging is enabled, which is probably the same experience you are seeing.
http://hangfire.discourse.group/t/expected-execution-time-for-a-single-call-to-enqueue-method/1994/2
I think it depends somehow on Visual Studio Profiler but I cannot find an official answer/solution.
Not sure if I’d call it a solution, but what I have done is line debug small batches of jobs to work out any issues and then test large sets without a line debugger attached.