Just trying to state that I only have this issue R2012a when installed on Windows 7.
This happens irrespective of processor/mem usage (8GB total with 5GB available; 7% processor usage). Swap space is huge, no problem running other demanding apps.
Once executed, even demanding commands do not execute slowly; it just takes several seconds to get them to execute if I have not been working in the command window. Java issue?