Coyote's Guide to IDL Programming

Analyzing Code

QUESTION: Whoa! When I fire up the IDL Workbench in IDL 7.0 in the morning, it seems to spend a lot of time doing something. My disks spin, my computer case shakes with the fans coming on, and everything slows down for several minutes. Down in the lower right hand side of the application, in the status bar, there is a message that the Workbench is analyzing code. What in the world does that mean, and why does it take so darn long to do it?

ANSWER: According to ITTVIS, the IDL Workbench is parsing all the *.pro files on your IDL path. In theory, this should not interrupt your work, because it is suppose to be taking place in background threads. In practice, it has been a bone of contention for almost everyone starting the Workbench up for the first time. ITTVIS promises to have a good, long look at this prior to the next IDL release.

The purpose of the parsing is to make it possible to have the routine chromacoded, registered into the Content Assist functionality, etc. In other words, a lot of the neat new functionality depends on this analysis of the code. Only code on your IDL path or in open (not closed) projects in the Workbench are parsed. (However, when you open a new or closed project, those files will also need to be analyzed before they are ready to be used in the Workbench.)

Still, there have been problems with it. Depending on how many files you have in your path (and people have been surprised that this number is approaching 10,000 in some cases!) this analysis process can last from one to ten minutes. You could go get coffee during this time, or you could try to limit the number of *.pro files on your path. There have been reports in the IDL newsgroup of the process never finishing if the *.pro files live on network servers. ITTVIS is looking into all of these problems and offering encouraging words about fixing them.

Updated Release: IDL 7.0.1

On 20 December 2007, ITTVIS announced an updated IDL release that addresses this problem. Here is the text of their announcement.

An update to the IDL 7.0 Workbench is now available on the ITT VIS workbench update site. The IDL 7.0.1 update provides a patch to the IDL Workbench that significantly speeds up the IDL code parser. When the IDL Workbench starts, it needs to parse all PRO code on your IDL path, to enable syntax highlighting, the outline view, content assist, hover help, and open declaration. This parsing happens in a background thread, but if you have a single CPU, or you have a large number of files on your path, or have files out on a network drive, then you might have experienced some slowdown in the IDL user interface. With the update to IDL 7.0.1, the parsing speed should be about 4 times faster, with even greater speed if your files are on a network drive. In addition, the status bar now provides a percent complete for the Analyzing Code job, which gives you a visual indication of how quickly it will finish.

To install the update, do the following steps:

Web Coyote's Guide to IDL Programming