FS#35616 - VIM syntax highlight significant slowdown

Attached to Project: Arch Linux
Opened by Daniil Bolsun (facecool) - Monday, 03 June 2013, 14:38 GMT
Last edited by Thomas Dziedzic (tomd123) - Friday, 05 July 2013, 05:49 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After upgrading gvim (gvim, vim-runtime) eruby files navigation becomes very slow. Possible issue is the syntax highlight.

Additional info:
* package version(s)
testing/vim-runtime 7.3.1105-1 (was 7.3.1070-1 before upgrade)
testing/gvim 7.3.1105-1 (was 7.3.1070-1 before upgrade)

Steps to reproduce:
Start vim
Open eruby file (or use attached one as example)
Enable filetype detection ":filetype on"
Enable syntax ":syntax on"
Scroll file line by line up and down, vim begins to respond very slow
This task depends upon

Closed by  Thomas Dziedzic (tomd123)
Friday, 05 July 2013, 05:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  gvim 7.3.1287-1
Comment by Thomas Dziedzic (tomd123) - Monday, 03 June 2013, 15:15 GMT
Hi Dan, I am aware that the latest vim is slow.
The most likely reason behind the slow speed is that vim has introduced a new regexp engine and it isn't as fast as the older one.

check out :help 'regexpengine' for more info

try using the old engine and see if that helps:
:set regexpengine=1

This is another reason why I am going to keep vim in [testing] for the time being.
Comment by Boohbah (Boohbah) - Wednesday, 05 June 2013, 06:02 GMT
Hi Thomas, I can confirm that set regexpengine=1 fixes the issue.
Thanks for the info!
Comment by Thomas Dziedzic (tomd123) - Thursday, 06 June 2013, 15:05 GMT
@Boohbah

Hey, can you remove the line :set regexpengine=1 from your vimrc and test again?
I just uploaded vim 1131 and it seems that it has fixed the slow syntax highlighting for this file.

If you don't encounter any more slowness, you should probably stop using regexpengine=1 so that you can test other files you use that might be affected by the new regexpengine.
Comment by Daniil Bolsun (facecool) - Friday, 07 June 2013, 06:59 GMT
Hi,

I've just updated gvim and vim-runtime to 1131 and tested it with default regexpengine (=0) option.
Attached file and some other complex syntax files scroll fast. Visually there is no slowdown.
Anyway I'll continue testing and report if any.

Thank you!
Comment by Boohbah (Boohbah) - Saturday, 08 June 2013, 23:15 GMT
Hi Thomas,
I'm now running vim 7.3.1145-1 and I've commented out set regexpengine=1 in my .vimrc. While there is much improvement in speed compared to 7.3.1105-1 while navigating over pairs of braces in my ruby source files with syntax highlighting turned on, there is still a slight but noticeable slowdown compared to enabling set regexpengine=1. Please let me know if I can provide any more information. Thanks!
Comment by Thomas Dziedzic (tomd123) - Sunday, 09 June 2013, 01:03 GMT
@Boohbah
It seems like I will just wait until vim's new regex engine is fast enough.
In case it doesn't become fast in a very long time (maybe a month?), I will just set regexengine to 1 in the global vimrc temporarily until the speed issues go away.

For now, I will just keep the latest vim in [testing]
Comment by Thomas Dziedzic (tomd123) - Saturday, 15 June 2013, 17:21 GMT
@Boohbah
I just released vim 7.3.1200 and I have tested the erb and some rb files with braces and I haven't noticed any slowdowns with :set regexpengine=2
can you confirm this?
Comment by Boohbah (Boohbah) - Friday, 28 June 2013, 14:26 GMT
Hi Thomas,

Yes, it's fixed.

Loading...