-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile syntax highlighting performance #33
Comments
Vim was getting terribly slow when editing org files. It went back to normal after disabling syntax highlight (with I've use syntax highlight for many file types, and never got this performance issue. The orgmode plugin really needs a patch. I've profile VIM after this answer. The summary of the profile output is listed bellow:
|
If it is the syntax highlighting that is slow, you need to profile it using Not surprisingly, the slow pattern is the Feel free to try to improve it. |
Turns out the biggest performance bottleneck was not that pattern, but the overall way the table syntax highlight was implemented. It has been improved in #75 |
Thanks for the fix! It indeed improved the usability a lot. However, I think there is still room for a lot of improvement. After the fix, If I type regularly I get not delay, but I still notice a delay if I type like mad (random key presses, just for the sake of stressing vim). I've profiled the syntax highlight on a 300 lines org file, as well as a 300 lines python file (GG's feed.py). The top 10 results and the totals are shown below. The total time is 10x smaller on python, and the average time of the slowest operation is 7 times smaller on python. org
python
These reports were generated with:
|
Patches are welcome! |
Note: in order to profile syntax highlighting performance, you need to have Vim compiled with
+profile
,and use the
:syntime
command.See http://vimhelp.appspot.com/syntax.txt.html#%3Asyntime
The text was updated successfully, but these errors were encountered: