Hi All! I'd like to whine about VIM 7 performance a little bit. I use VIM both on Windows and Linux and really love it. But recently I found myself using another editor (embedded editor in FAR file manager, if you know what it is) more often than I'd like to. I analyzed myself and found that the reason is VIM startup time. My VIM configuration became more comples, I moved to VIM 7 and suddenly my the delay of VIM startup became too long for my brain so the brain chooses to start another editor sometimes. This applied to Windows only, because Linux startup is OK (so far - I'm on 6.3 there). Timed with
gvim -c :q .vimrc it takes 0.91 seconds for VIM to start up and shut down. I didn't like this thing and decided to do some investigations on VIM startup time. Since the start up time usually has to do with reading various configuration files, I profiled the VIM startup with filemon (from sysinternals.com) and it showed several interesting (maybe to me only) things. 1. Enabling spell checking in .vimrc file is pretty expensive. When I comment out line set spell spelllang=en,ru the startup time reduces to 0.6 seconds. 2. Taglist plugin does a search for ctags command which becames pretty expensive once you have a lot of directories in your PATH. I was able to make it to avoid the search by adding line let g:Tlist_Ctags_Cmd = 'ctags' to my .vimrc. This saved about 0.06 seconds. Not that big but better than it was. 3. I found that I pay about 0.2 seconds on every VIM startup for Perl, TCL, Python and Scheme interfaces. This is very approximate number - I got it from filemon logs and didn't try to recompile VIM without those features. As far as I can see, VIM locates (and loads?) Perl, TCL, Python and Scheme libraries and reads in / parses perl.vim, tcl.vim, python.vim and scheme.vim syntax files. From the source code it seems to be that loading of these interfaces should be on demand, so I'm not sure why this happens. Any hints? 4. There are other places which contribute to the start-up time (not so big, though). For example, I found a lot of reading from $VIMRUNTIME/rgb.txt file. It turned out that I use desert color scheme, which refers the colors by their names. These names are read from the abovementioned file along with their RGB values (gui_mch_get_color). What is not very good is that reading is done for every gui_mch_get_color call (well, if the name of the color is not in pre-defined table) and the result is not kept in the memory. The number 1 above concerns me most of all. I really like spell-checking but paying 0.3 seconds on each startup seems to be slow. It would be nice if VIM could do the loading of spl files in background. -- Alexei Alexandrov