I noticed a relatively recent performance issue in cc-mode. Try opening the following attached file, which is a random c++ piece of code containing some template-heavy function repeated multiple times. In emacs -q -nw, try to scroll down a bit, then up. Emacs gets busy in a display loop. Under x11/lucid (emacs/lucid with NATIVE_FULL_AOT=1), it's a bit more responsive at first, but still gets stuck in the display loop to the point of being unusable after a few seconds.