Speeding Up Syntax Formatting

Source Insight has many interesting and useful display features for formatting source code. Some of those features require a significant amount of processing.

The display code has been sped up considerably to be able to provide more features with acceptable performance. However, if you notice that version 3.5's display speed is a bit slower than version 2.1, keep in mind that a lot more information is being displayed. It is possible to reduce the display functionality to that of version 2.1 and speed it up.

The Preferences: Syntax Formatting dialog box lets you specify how detailed you want the display. Each option has a performance cost. The significant options are listed here, starting with the least costly, to the slowest and most costly:

1. Apply styles for references to members

2. Apply styles for symbol declarations

3. Apply styles for local symbol declarations

4. Apply styles for references to function-local symbols

5. Apply styles for non-function-local symbols

6. Find references using the Project Symbol Path

7. Qualify member references

In general, identifying “references” is slower than “declarations”. Identifying references to symbols can be slower if the project is very large, because each reference has to be resolved with a symbol lookup.

The symbol lookup engine has been heavily optimized to allow formatting references to symbols at “display speed”. A lot of information is cached in the process, so you may notice that the first time you open a file and start scrolling around in it, it may slow down sometimes. Subsequent viewing of the file will speed up.

Some people want the fastest possible display. However, you may be willing to sacrifice a little of that speed in turn for more useful information that increases productivity.