I have some C++ sources files which are in a few mega-bytes (a few tens thousands lines) to view and edit. The performance looks really bad in Vim. Refersh (<C-l>) or input single char in insert mode take several seconds to complete. I tried :syn off then all previous operations responded immediately. I also tried set maxlines and minlines to just a few hundred lines, but it doesn't help this situation. Syntax highlighting is not required to be accurate, but editing  without it looks a little crazy. Any suggestion to fix such performance issue on syntax highlighting with large files in Vim (I am using gVim)?UPDATE: I profiled one refresh operation with my large CPP file, and there are many lines like below, how to understand such lines and find out the culprit?TOTAL    COUNT MATCH SLOWEST  AVERAGE  NAME       PATTERN0.248213 58529 28680 0.000127 0.000004 IndentLine \%(^\S\+\)\@<=\%9c...
Improve performance of syntax highlighting in Vim
syntax highlighting;performance