Use a local ado directory

I do not know why, but networked Stata tends to be very slow if the main ado folders are located on the server. Copying the files to a local folder and changing Stata's default directory can really speed things up. For me, it made things about four times faster on average.

You can of course move the ado files manually, but if you want to update them on a regular basis it will be easier to do it through Stata. The shell command allows the user to issue commands to the operating system. If you are on a Windows computer, just type the following in your do file:

!xcopy "server directory" "local directory"  /i /y /e /d
sysdir set BASE "C:\ado\base"

Where the xcopy arguments are explained below:

/i	Creates non-existing directories
/y	Suppresses confirmation for overwriting existing files
/e 	Copy sub directories, even if they are empty
/d 	Only update if source file is newer

On my computer, this translates to:

!xcopy "\\agora\userdata\staff\Stata15\ado\base" "C:\ado\base"  /i /y /e /d
sysdir set BASE "C:\ado\base"

It should be mentioned that after we moved to Stata 15, this method has stopped the import excel command from working. The command only returns a set of uninformative error codes and the problem would probably be solved if our version of Stata was updated.