Source code location should not be a problem. Try the following troubleshooting steps
1) Is this delay specific to one project ? Can you open a project normally if it is a simple standalone executable ?
If your answers to the above questions are not true then try the step below.
2) 'deploytool projectname' will checkout a compiler license before opening deploytool. So, see if the license checkout is causing the MATLAB to lag. To do this, do
put breakpoints in the code, then do
>> deploytool projectname
Step through the code. Identify which part of the code is taking more time.