Often, ambiguous code situations arise that require cc-mode to scan large portions of the buffer to determine syntactic context.
Some pathological code can cause cc-mode to slow down considerably.
This section identifies some of the coding styles to watch out for, and suggests some workarounds that you can use to improve performance. Note that this is an area that will get a lot of attention in cc-mode version 5. The mode should end up being much faster, at the expense of dropping Emacs 18 support, owing to the implementation of syntactic analysis caching. This is the last release of cc-mode that will be compatible with Emacs 18. The farther this position is from the current insertion point, the slower the mode gets.