Plugin takes 3-6 seconds to load via pathogen
fluffynuts opened this issue · comments
Referencing wakatime/vim-wakatime#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.
I spy use of the Python interface. My guess is it's somewhere in that black box.
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).
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@f9e5760, maybe this will speed things up.
I think that's only true of the plugin/
directory; you could move packages/
up to the top and be fine too.