sponsor Vim development Vim logo Vim Book Ad

startup_profile : Profile vim startup

 script karma  Rating 10/4, Downloaded by 1325  Comments, bugs, improvements  Vim wiki

created by
Tom Link
 
script type
patch
 
description
With the introduction of the autoload directory, plugins were often
split into several separate files. The downside is that it isn't always
that obvious which files are actually loaded on startup.

This macro creates a CSV file including a list of loaded files during
startup and some indicators (number of lines/bytes, timing). You can
open this (semicolon-separated) CSV in any spreadsheet application, sort
the data etc.

In order to activate the macro, check the value of g:startup_profile_csv
in the source code and temporarily insert the following line(s) at the
beginning of your |vimrc| file: >

    " Setting g:startup_profile_csv is optional.
    let g:startup_profile_csv = "..."
    runtime macros/startup_profile.vim

The list can serve as a starting point for optimizing your startup time,
e.g. by delaying certain calls to functions in autoload files or by
making use of the AsNeeded (vimscript #915) or the tplugin (vimscript #2917)
plugins.

Depending on your system configuration and the speed of your hard drive,
seeking for files or, e.g., creating menu entries may prove to be costly
with respect to startup time.
 
install details
startup_profile requires vim 7.2.

Edit the vba file and type: >

    :so %

See :help vimball for details.

Add "runtime macros/startup_profile.vim" to your |vimrc| file but see
above.

Also available via git: http://github.com/tomtom/startup_profile_vim

NOTE. The script category (see above) is wrong. This is a utility/macro,
no patch.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
startup_profile.vba.gz 0.2 2010-01-09 7.0 Tom Link - Add size data on VimEnter, minimize impact of script logging on startup time
startup_profile.vba.gz 0.1 2010-01-04 7.0 Tom Link Initial upload
ip used for rating: 107.23.157.16

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github