In order to improve IDEAprocessor's performance, IDEAprocessor itself was used to perform an analysis on its own source code. For example, several user tools make use of the ability for IDEAprocessor to remove an image (i.e. a thing or a link) from a GraphicBoard and refresh the screen (update) for a visual indication to the user. For example, when a user deletes a thing or link, this function is called. Also, when the user moves a thing, the object is deleted from the screen and then created in another part of the screen then the screen is refreshed to visually indicate the change. Internally, this function is named retract_grafix.
We noticed a problem with this setup; for those user function that work on several objects at a time, a noticeable slow down in the visual update of the GraphicBoard occurs. When the user moves several things at a time, the screen would be refreshed after each thing is moved. The ideal situation would be to refresh the screen once after all the things have been moved without changing the functionality of the other tools that depend on retract_grafix. For this, we needed to build a hierarchy of functions that depend retract_grafix.
We have built a program that would parse our source code and produce an IDEAprocessor file. The immediate dependencies (function calls) on retract_grafix can be seen in figure 1. The entire dependency graph can be seen in figure 2. Viewing this dependency graph allows us to see in which functions to insert a call to refresh_screen after we remove this call from retract_grafix. Therefore, all the simple tools (i.e. simple display) would call refresh_screen after displaying a thing. In addition, all the complex tools (i.e. move several objects) would make a call to refresh_screen once after all the objects' positions are changed. The dependency graph allows us to see exactly where to put the function calls while avoiding redundant calls. A call to refresh_screen is considered redundant if it occurs twice within the same chain of function calls that terminates with retract_grafix. The function that occurs in between that chain, and contains the function call to refresh_screen, can have this call removed to increase IDEAprocessor's performance.
Our parser produced over 2800 things and about 7800 links from our source code. It took the parser approximately seven minutes to create the IDEAprocessor file which contained all the things and links as well as one GraphicBoard displaying the dependency hierarchy stemming from retract_grafix function.