Monday, July 30, 2007

Context Switching


I'm working on a difficult programming task when the phone rings, "Oh, hi. I'm
doing well ..." Then when I'm done with the call, I inevitably ask myself,
"Now where was I?" When performing a mental task, one's mind has to hold
certain information (context). If that context is lost somehow, it must be
regained before continuing. The phone ringing required me to switch contexts
and then reestablish the former context when the call was done. The act of
reestablishing context is an overhead cost for mental work. Bryan Dollery
estimates the cost of a context switch at around 10 minutes. That's 10
minutes of wasted effort.



For business purposes, I keep track of which tasks I'm working on throughout
the day. Anytime there's a context switch that lasts longer than a couple
minutes, I record the changed focus so that I can bill my clients correctly. I
wrote a quick report against my time tracking application. Assuming that
reestablishing context takes about 5 minutes, here are my results for June
2007:



Total Duration         : 8998 min
Unique Tasks : 80
Context Switches : 219
Average Focus Duration : 41 min
Time Spent Switching : 1095 min
Switching % : 12%


During June, about 12% of every workday was wasted to context switching. In
any job, there is a certain amount of overhead, but this seems like an easy one
to reduce. Fortunately, most of that overhead is caused by one client, so I
just need to find a way to manage them more effectively.



2 comments:

JJGames said...

Very interesting post. I have noticed that phenomenon before, but wouldn't have thought it was ten minutes per switch. And 12%, that is quite the drop from max productivity.

I hope I am not that one client.

mndrix said...

No, JJGames, you're not that one client. I appreciate the concern though. I think the amount of time it takes to get back into "the zone" depends on the task and the length of the previous distraction. There have definitely been times when it took me 10 minutes to regain context, but I think 5 minutes is more typical; at least for me.