自从上次注销并重新登录后,我发现vim和其他无关程序的启动时间非常缓慢。以下是vim的启动时间日志:
> times in msec clock self+sourced self: sourced script clock
> elapsed: other lines
>
> 000.005 000.005: --- VIM STARTING ---
> 000.073 000.068: Allocated generic buffers
> 000.168 000.095: locale set
> 000.180 000.012: GUI prepared
> 000.181 000.001: clipboard setup
> 000.188 000.007: window checked
> 000.621 000.433: inits 1
> 000.626 000.005: parsing arguments
> 000.627 000.001: expanding arguments
> 000.637 000.010: shell init
> 000.909 000.272: Termcap init
> 000.942 000.033: inits 2
> 001.031 000.089: init highlight
> 023.418 000.234 000.234: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syncolor.vim
> 023.543 001.811 001.577: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/synload.vim
> 044.397 015.231 015.231: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/filetype.vim
> 044.449 025.111 008.069: sourcing /grid/common/pkgs/vim/latest/share/vim/vim73/syntax/syntax.vim
> 052.532 000.199 000.199: sourcing /grid/common/pkgsData/vim-v7.3/Linux/RHEL4.0-2007-x86_64/share/vim/vim73/syntax/nosyntax.vim
> 059.858 000.175 000.175: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syncolor.vim
> 059.966 003.842 003.667: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/synload.vim
> 060.002 010.259 006.218: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syntax.vim
> 069.085 000.178 000.178: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syncolor.vim
> 072.326 000.173 000.173: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syncolor.vim
> 076.317 000.175 000.175: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/syntax/syncolor.vim
> 076.477 013.311 012.785: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/colors/desert.vim
> 079.768 000.019 000.019: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/filetype.vim
> 080.322 065.921 017.221: sourcing $HOME/.vimrc
> 080.330 013.378: sourcing vimrc file(s)
> 106.526 000.376 000.376: sourcing /home/haitham/.vim/plugin/genutils.vim
> 111.139 001.435 001.435: sourcing /home/haitham/.vim/plugin/multiselect.vim
> 113.534 000.147 000.147: sourcing /home/haitham/.vim/plugin/omap-param.vim
> 119.245 000.073 000.073: sourcing /home/haitham/.vim/plugin/qfixtoggle.vim
> 122.821 000.696 000.696: sourcing /home/haitham/.vim/plugin/surround.vim
> 172.247 000.098 000.098: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/getscriptPlugin.vim
> 176.387 000.252 000.252: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/gzip.vim
> 179.876 000.183 000.183: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/matchparen.vim
> 182.748 000.620 000.620: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/netrwPlugin.vim
> 186.171 000.051 000.051: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/rrhelper.vim
> 189.739 000.046 000.046: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/spellfile.vim
> 193.406 000.195 000.195: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/tarPlugin.vim
> 199.206 000.060 000.060: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/tohtml.vim
> 202.299 000.152 000.152: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/vimballPlugin.vim
> 205.345 000.147 000.147: sourcing /grid/common/pkgs/vim/v7.3/share/vim/vim73/plugin/zipPlugin.vim
> 205.394 120.533: loading plugins
> 12343.581 12138.187: inits 3
> 12349.592 006.011: reading viminfo
> 18421.239 6071.647: setup clipboard
> 18421.264 000.025: setting raw mode
> 18421.270 000.006: start termcap
> 18421.293 000.023: clearing screen
> 18421.504 000.211: opening buffers
> 18421.564 000.060: BufEnter autocommands
> 18421.566 000.002: editing files in windows
> 18425.833 004.267: VimEnter autocommands
> 18425.835 000.002: before starting main loop
> 18426.587 000.752: first screen update
> 18428.334 001.747: --- VIM STARTED ---
显然,最重要的组件是“inits 3”和“setup clipboard”。
有什么线索可以解决这个问题吗?