Saturday, December 15, 2007

Setting up Slickedit to work with large code base on a server

I am writing code for Linux, but my editing environment is Windows - I use SlickEdit to edit stuff off a file server that hosts my home directory.

If you use this approach naively, as I did in the very beginning, there is a good chance you will end up with the configuration that is painfully slow - from opening the files, to clicking the menus, to doing the context switches.

Here are the steps that one needs to do to get Visual SlickEdit to work well in this environment. The instructions are relevant for really big projects (tens of thousands of files), if yours is only a few files, you might not need this.

(1) Do NOT use UNC (\\server\share) names. Map a network drive. This makes SMB connection persist for longer than in the case of a UNC access, and makes switching away and back to the editor much much much faster. This may depend on the server, too - in my case the server is a NetApp appliance, and it makes a huge difference.

(2) If menus take a long time to show up, turn off makefile menus. What happens here is whenever click on the menu, SlickEdit re-reads all of the makefiles in your project. Here are instructions on how to do it, from SlickEdit's support:

Do you have a large number of makefiles in your project or workspace? Or any makefiles at all?

You can go to Macro-->Set Macro Variable and set the value of def_show_makefile_target_menu to either 2 or 0. This slowdown is usually seen when you have a large number of makefiles and/or source files in your workspace and stems from the Target menu being added to the Build Menu.

1) Bring up the Set Variable dialog (Macro-->Set Macro Variable).
2) Enter def_show_makefile_target_menu in the "Variable:" field.
3) Enter 2 in the "Value:" field.
4) Hit OK.

Here are the variable's valid values just in case you want to move to the 0 level:

0 - Disable all makefile submenus (Build menu and project toolbar)
1 - Enable all makefile submenus (Default)
2 - Enable makefile submenus only in the project toolbar (Build menu makefile targets are disabled)

(3) Remove all files named ltmain.sh from the project. SlickEdit reparses them every time it regains focus, resulting in more network traffic - and longer switch latency.

(4) [Added 02/06/2008] Disable Auto-list compatible parameters in Tools->Options->File Extensions Setup->Tagging (this needs to be done per extension). See http://1-800-magic.blogspot.com/2008/02/slow-slickedit-part-ii.html.

Have more tips about editing on the network? Share them here...

4 comments:

Unknown said...

I know a little about SlickEdit :-) First, thanks for providing some good tips on using SlickEdit for large code projects. I just thought I would add that for the next release of SlickEdit (V13), I have fixed the performance problem with makefiles by limiting the number of makefiles displayed in the menu.

Sergey Solyanik said...

Great news! SlickEdit is a wonderful tool - absolutely must have for any big project.

Unknown said...

Thank you.

After moving to a home office the menu delay had become unbearable.

Anonymous said...

Thank you so much. You may have saved lives here. Other programmers here run the same v11 slickedit on the same linux box in the same network environment. But only some have this slowdown - it can be maddening.