tpope / vim-pathogen

pathogen.vim: manage your runtimepath
http://www.vim.org/scripts/script.php?script_id=2332
Vim License
12.12k stars 1.16k forks source link

Plugin takes 3-6 seconds to load via pathogen #196

Closed fluffynuts closed 6 years ago

fluffynuts commented 6 years ago

Referencing https://github.com/wakatime/vim-wakatime/issues/60, when loading the vim-wakatime plugin via pathogen, vim takes an extra 3-6 seconds to start up. If I move the plugin out of bundle and manually load with:

" .... at the end of my .vimrc
execute pathogen#infect()
source ~/vimfiles/bundle/disabled/vim-wakatime/plugin/wakatime.vim

Then loading times for the vim-wakatime plugin drop back down to around 2ms.

tpope commented 6 years ago

I spy use of the Python interface. My guess is it's somewhere in that black box.

fluffynuts commented 6 years ago

It's interesting that even if I remove the main .vim file, it still takes that amount of time to load (though, of course, the actual plugin isn't functional).

alanhamlett commented 6 years ago

It's because Vim is scanning every file in the vim-wakatime/plugin/packages/ folder on startup. I think autoload folders are the only exception?

I've moved vim-wakatime/plugin/packages to vim-wakatime/autoload/packages with wakatime/vim-wakatime@f9e5760e72ae58e8c33b527e09554a7a3de03b08, maybe this will speed things up.

tpope commented 6 years ago

I think that's only true of the plugin/ directory; you could move packages/ up to the top and be fine too.