Created
February 18, 2014 15:21
-
-
Save mopp/9073018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FUNCTION neobundle#autoload#function() | |
Called 3 times | |
Total time: 0.008816 | |
Self time: 0.002334 | |
count total (s) self (s) | |
3 0.000025 let function = expand('<amatch>') | |
3 0.000056 let function_prefix = get(split(function, '#'), 0, '') . '#' | |
3 0.003212 0.002182 let bundles = filter(neobundle#config#get_autoload_bundles(), "get(v:val.autoload, 'function_prefix', '').'#' ==# function_prefix || (has_key(v:val.autoload, 'functions') && index(neobundle#util#convert2list( v:val.autoload.functions), function) >= 0)") | |
3 0.005511 0.000059 call neobundle#config#source_bundles(bundles) | |
FUNCTION neobundle#util#is_windows() | |
Called 1 time | |
Total time: 0.000004 | |
Self time: 0.000004 | |
count total (s) self (s) | |
1 0.000003 return s:is_windows | |
FUNCTION neobundle#config#get_types() | |
Called 100 times | |
Total time: 0.002047 | |
Self time: 0.002047 | |
count total (s) self (s) | |
100 0.000478 let type = get(a:000, 0, '') | |
100 0.000221 if type ==# 'git' | |
100 0.000408 if !exists('s:neobundle_type_git') | |
let s:neobundle_type_git = neobundle#types#git#define() | |
endif | |
100 0.000203 return s:neobundle_type_git | |
endif | |
if !exists('s:neobundle_types') | |
" Load neobundle types. | |
let s:neobundle_types = [] | |
for list in map(split(globpath(&runtimepath, 'autoload/neobundle/types/*.vim', 1), '\n'), "neobundle#util#convert2list( neobundle#types#{fnamemodify(v:val, ':t:r')}#define())") | |
let s:neobundle_types += list | |
endfor | |
let s:neobundle_types = neobundle#util#uniq( s:neobundle_types, 'v:val.name') | |
endif | |
return (type == '') ? s:neobundle_types : get(filter(copy(s:neobundle_types), 'v:val.name ==# type'), 0, {}) | |
FUNCTION neobundle#config#source_bundles() | |
Called 18 times | |
Total time: 0.005601 | |
Self time: 0.000215 | |
count total (s) self (s) | |
18 0.000058 if !empty(a:bundles) | |
1 0.004522 call neobundle#config#source(map(copy(a:bundles), "type(v:val) == type({}) ? v:val.name : v:val")) | |
1 0.000001 endif | |
FUNCTION neobundle#set_neobundle_dir() | |
Called 1 time | |
Total time: 0.000006 | |
Self time: 0.000006 | |
count total (s) self (s) | |
1 0.000004 let s:neobundle_dir = a:path | |
FUNCTION neobundle#get_rtp_dir() | |
Called 16 times | |
Total time: 0.000071 | |
Self time: 0.000071 | |
count total (s) self (s) | |
16 0.000059 return s:neobundle_dir . '/.neobundle' | |
FUNCTION neobundle#autoload#init() | |
Called 1 time | |
Total time: 0.000584 | |
Self time: 0.000068 | |
count total (s) self (s) | |
1 0.000001 augroup neobundle | |
1 0.000008 autocmd FileType * call neobundle#autoload#filetype() | |
1 0.000006 autocmd FuncUndefined * call neobundle#autoload#function() | |
1 0.000012 autocmd BufNewFile,BufRead * call neobundle#autoload#filename(expand('<afile>')) | |
1 0.000006 autocmd InsertEnter * call neobundle#autoload#insert() | |
1 0.000004 autocmd BufCreate * call neobundle#autoload#explorer( expand('<afile>'), 'BufCreate') | |
1 0.000006 autocmd BufEnter * call neobundle#autoload#explorer( expand('<afile>'), 'BufEnter') | |
1 0.000005 autocmd BufWinEnter * call neobundle#autoload#explorer( expand('<afile>'), 'BufWinEnter') | |
1 0.000001 augroup END | |
1 0.000528 0.000012 call neobundle#autoload#filename(bufname('%')) | |
FUNCTION neobundle#util#convert2list() | |
Called 1359 times | |
Total time: 0.006752 | |
Self time: 0.006752 | |
count total (s) self (s) | |
1359 0.005873 return type(a:expr) ==# type([]) ? a:expr : [a:expr] | |
FUNCTION neobundle#util#uniq() | |
Called 75 times | |
Total time: 0.004844 | |
Self time: 0.004844 | |
count total (s) self (s) | |
75 0.000520 let list = a:0 ? map(copy(a:list), printf('[v:val, %s]', a:1)) : copy(a:list) | |
75 0.000157 let i = 0 | |
75 0.000151 let seen = {} | |
105 0.000319 while i < len(list) | |
30 0.001501 let key = string(a:0 ? list[i][1] : list[i]) | |
30 0.000175 if has_key(seen, key) | |
call remove(list, i) | |
else | |
30 0.000226 let seen[key] = 1 | |
30 0.000067 let i += 1 | |
30 0.000032 endif | |
30 0.000038 endwhile | |
75 0.000229 return a:0 ? map(list, 'v:val[0]') : list | |
FUNCTION neobundle#config#is_sourced() | |
Called 91 times | |
Total time: 0.001201 | |
Self time: 0.000740 | |
count total (s) self (s) | |
91 0.001131 0.000670 return get(neobundle#config#get(a:name), 'sourced', 0) | |
FUNCTION neobundle#autoload#filename() | |
Called 1 time | |
Total time: 0.000516 | |
Self time: 0.000292 | |
count total (s) self (s) | |
1 0.000503 0.000279 let bundles = filter(neobundle#config#get_autoload_bundles(), "has_key(v:val.autoload, 'filename_patterns')") | |
1 0.000005 if !empty(bundles) | |
call neobundle#config#source_bundles(filter(copy(bundles)," len(filter(copy(neobundle#util#convert2list( v:val.autoload.filename_patterns)), 'a:filename =~? v:val')) > 0")) | |
endif | |
FUNCTION neobundle#util#name_conversion() | |
Called 100 times | |
Total time: 0.001988 | |
Self time: 0.001988 | |
count total (s) self (s) | |
100 0.001901 return fnamemodify(a:path, ':s?/$??:t:s?\c\.git\s*$??') | |
FUNCTION neobundle#rc() | |
Called 1 time | |
Total time: 0.007577 | |
Self time: 0.000293 | |
count total (s) self (s) | |
1 0.000262 let path = (a:0 > 0) ? a:1 : get(filter(split(globpath(&runtimepath, 'bundle', 1), '\n'), 'isdirectory(v:val)'), 0, '~/.vim/bundle') | |
1 0.007313 0.000029 return neobundle#init#_rc(path) | |
FUNCTION neobundle#parser#lazy() | |
Called 77 times | |
Total time: 0.117872 | |
Self time: 0.004531 | |
count total (s) self (s) | |
77 0.069417 0.000796 let bundle = s:parse_arg(a:arg) | |
77 0.000175 if empty(bundle) | |
return {} | |
endif | |
" Update lazy flag. | |
77 0.000144 let bundle.lazy = 1 | |
77 0.000137 let bundle.resettable = 0 | |
86 0.000243 for depend in bundle.depends | |
9 0.000021 let depend.lazy = bundle.lazy | |
9 0.000017 let depend.resettable = 0 | |
9 0.000015 endfor | |
77 0.046648 0.001928 call neobundle#config#add(bundle) | |
77 0.000137 return bundle | |
FUNCTION neobundle#parser#path() | |
Called 100 times | |
Total time: 0.025437 | |
Self time: 0.007343 | |
count total (s) self (s) | |
100 0.000483 let opts = get(a:000, 0, {}) | |
100 0.000517 let site = get(opts, 'site', g:neobundle#default_site) | |
100 0.001025 let path = substitute(a:path, '/$', '', '') | |
100 0.001184 if path !~ '^/\|^\a:' && path !~ ':' | |
" Add default site. | |
100 0.000469 let path = site . ':' . path | |
100 0.000101 endif | |
100 0.000294 if has_key(opts, 'type') | |
let type = neobundle#config#get_types(opts.type) | |
let types = empty(type) ? [] : [type] | |
else | |
100 0.019611 0.001517 let detect = neobundle#config#get_types('git').detect(path, opts) | |
100 0.000321 if !empty(detect) | |
100 0.000152 return detect | |
endif | |
let types = neobundle#config#get_types() | |
endif | |
for type in types | |
let detect = type.detect(path, opts) | |
if !empty(detect) | |
return detect | |
endif | |
endfor | |
if isdirectory(path) | |
" Detect nosync type. | |
return { 'name' : split(path, '/')[-1], 'uri' : path, 'type' : 'nosync' } | |
endif | |
return {} | |
FUNCTION neobundle#config#get_neobundles() | |
Called 61 times | |
Total time: 0.001077 | |
Self time: 0.001077 | |
count total (s) self (s) | |
61 0.001028 return values(s:neobundles) | |
FUNCTION neobundle#config#get_autoload_bundles() | |
Called 19 times | |
Total time: 0.004592 | |
Self time: 0.004592 | |
count total (s) self (s) | |
19 0.004575 return filter(values(s:neobundles), "!v:val.sourced && v:val.rtp != '' && v:val.lazy") | |
FUNCTION neobundle#parser#fetch() | |
Called 1 time | |
Total time: 0.001066 | |
Self time: 0.000035 | |
count total (s) self (s) | |
1 0.000949 0.000015 let bundle = s:parse_arg(a:arg) | |
1 0.000003 if empty(bundle) | |
return {} | |
endif | |
" Clear runtimepath. | |
1 0.000002 let bundle.rtp = '' | |
1 0.000106 0.000009 call neobundle#config#add(bundle) | |
1 0.000002 return bundle | |
FUNCTION neobundle#util#join_rtp() | |
Called 16 times | |
Total time: 0.000455 | |
Self time: 0.000455 | |
count total (s) self (s) | |
16 0.000442 return (a:runtimepath !~ '\\' && a:rtp !~ ',') ? join(a:list, ',') : join(map(copy(a:list), 's:escape(v:val)'), ',') | |
FUNCTION neobundle#config#init() | |
Called 1 time | |
Total time: 0.005948 | |
Self time: 0.002484 | |
count total (s) self (s) | |
1 0.003240 0.000323 filetype off | |
92 0.000557 for bundle in values(s:neobundles) | |
91 0.000423 if (!bundle.resettable && !bundle.lazy) || (bundle.sourced && bundle.lazy && neobundle#is_sourced(bundle.name)) | |
call neobundle#config#rtp_add(bundle) | |
elseif bundle.resettable | |
" Reset. | |
14 0.000599 0.000106 call neobundle#config#rtp_rm(bundle) | |
14 0.000099 call remove(s:neobundles, bundle.name) | |
14 0.000016 endif | |
91 0.000099 endfor | |
" Load extra bundles configuration. | |
1 0.000076 0.000022 call neobundle#config#load_extra_bundles() | |
1 0.000002 augroup neobundle | |
1 0.000013 autocmd VimEnter * call s:on_vim_enter() | |
1 0.000002 augroup END | |
FUNCTION neobundle#call_hook() | |
Called 31 times | |
Total time: 0.003034 | |
Self time: 0.002253 | |
count total (s) self (s) | |
31 0.000550 0.000338 let bundles = neobundle#util#convert2list( (empty(a:000) ? neobundle#config#get_neobundles() : a:1)) | |
31 0.000808 let bundles = filter(copy(bundles), 'has_key(v:val.hooks, a:hook_name) && !has_key(v:val.called_hooks, a:hook_name)') | |
31 0.000121 if a:hook_name ==# 'on_source' || a:hook_name ==# 'on_post_source' | |
31 0.001055 0.000486 let bundles = filter(neobundle#config#tsort(filter(bundles, 'neobundle#config#is_sourced(v:val.name) && neobundle#config#is_installed(v:val.name)')), 'has_key(v:val.hooks, a:hook_name) && !has_key(v:val.called_hooks, a:hook_name)') | |
31 0.000033 endif | |
31 0.000073 for bundle in bundles | |
call call(bundle.hooks[a:hook_name], [bundle], bundle) | |
let bundle.called_hooks[a:hook_name] = 1 | |
endfor | |
FUNCTION neobundle#parser#bundle() | |
Called 22 times | |
Total time: 0.079014 | |
Self time: 0.000548 | |
count total (s) self (s) | |
22 0.015592 0.000204 let bundle = s:parse_arg(a:arg) | |
22 0.000100 let is_parse_only = get(a:000, 0, 0) | |
22 0.000042 if !is_parse_only | |
13 0.063168 0.000090 call neobundle#config#add(bundle) | |
13 0.000013 endif | |
22 0.000032 return bundle | |
FUNCTION neobundle#autoload#source() | |
Called 15 times | |
Total time: 0.018880 | |
Self time: 0.009877 | |
count total (s) self (s) | |
15 0.018615 0.009761 let bundles = filter(neobundle#config#get_autoload_bundles(), "index(neobundle#util#convert2list( get(v:val.autoload, 'on_source', [])), a:bundle_name) >= 0") | |
15 0.000244 0.000095 call neobundle#config#source_bundles(bundles) | |
FUNCTION neobundle#config#check_not_exists() | |
Called 15 times | |
Total time: 0.021727 | |
Self time: 0.001138 | |
count total (s) self (s) | |
" For infinite loop. | |
15 0.000065 let self = get(a:000, 0, []) | |
15 0.020285 0.000176 let _ = map(neobundle#get_not_installed_bundles(a:names), 'v:val.name') | |
30 0.000312 for bundle in map(filter(copy(a:names), 'index(self, v:val) < 0 && has_key(s:neobundles, v:val)'), 's:neobundles[v:val]') | |
15 0.000071 call add(self, bundle.name) | |
15 0.000043 if !empty(bundle.depends) | |
let _ += neobundle#config#check_not_exists( map(copy(bundle.depends), 'v:val.name'), self) | |
endif | |
15 0.000014 endfor | |
15 0.000588 0.000108 return neobundle#util#uniq(_) | |
FUNCTION neobundle#config#load_extra_bundles() | |
Called 1 time | |
Total time: 0.000054 | |
Self time: 0.000047 | |
count total (s) self (s) | |
1 0.000027 0.000020 let path = neobundle#get_neobundle_dir() . '/extra_bundles.vim' | |
1 0.000020 if filereadable(path) | |
source `=path` | |
endif | |
FUNCTION neobundle#util#expand() | |
Called 116 times | |
Total time: 0.002795 | |
Self time: 0.002795 | |
count total (s) self (s) | |
116 0.002009 let path = expand(escape(a:path, '*?{}'), 1) | |
116 0.000648 return (s:is_windows && path =~ '\\') ? neobundle#util#substitute_path_separator(path) : path | |
FUNCTION neobundle#init#_rc() | |
Called 1 time | |
Total time: 0.007284 | |
Self time: 0.000622 | |
count total (s) self (s) | |
1 0.000070 0.000034 let path = neobundle#util#substitute_path_separator( neobundle#util#expand(a:path)) | |
1 0.000009 if path =~ '/$' | |
let path = path[: -2] | |
endif | |
1 0.000025 0.000019 call neobundle#set_neobundle_dir(path) | |
" Join to the tail in runtimepath. | |
1 0.000015 0.000010 let rtp = neobundle#get_rtp_dir() | |
1 0.000028 execute 'set rtp-='.fnameescape(rtp) | |
1 0.000069 0.000017 let rtps = neobundle#util#split_rtp(&runtimepath) | |
1 0.000007 let n = index(rtps, $VIMRUNTIME) | |
1 0.000060 0.000029 let &runtimepath = neobundle#util#join_rtp( insert(rtps, rtp, n-1), &runtimepath, rtp) | |
1 0.000003 augroup neobundle | |
1 0.000428 autocmd! | |
1 0.000002 augroup END | |
1 0.005959 0.000011 call neobundle#config#init() | |
1 0.000597 0.000013 call neobundle#autoload#init() | |
FUNCTION neobundle#config#fuzzy_search() | |
Called 15 times | |
Total time: 0.014313 | |
Self time: 0.005011 | |
count total (s) self (s) | |
15 0.000040 let bundles = [] | |
30 0.000076 for name in a:bundle_names | |
15 0.004391 0.004133 let bundles += filter(neobundle#config#get_neobundles(), 'stridx(v:val.name, name) >= 0') | |
15 0.000026 endfor | |
15 0.000031 let _ = [] | |
30 0.000061 for bundle in bundles | |
15 0.007668 0.000189 let _ += neobundle#config#search( map(copy(bundle.depends), 'v:val.name')) | |
15 0.000068 call add(_, bundle) | |
15 0.000018 endfor | |
15 0.001663 0.000098 return neobundle#util#uniq(_) | |
FUNCTION neobundle#get_not_installed_bundles() | |
Called 15 times | |
Total time: 0.020109 | |
Self time: 0.000875 | |
count total (s) self (s) | |
15 0.014524 0.000211 let bundles = empty(a:bundle_names) ? neobundle#config#get_neobundles() : neobundle#config#fuzzy_search(a:bundle_names) | |
15 0.004741 0.000299 call neobundle#installer#_load_install_info(bundles) | |
15 0.000797 0.000318 return filter(copy(bundles), " v:val.rtp != '' && !v:val.local && !isdirectory(neobundle#util#expand(v:val.path))") | |
FUNCTION neobundle#parser#_function_prefix() | |
Called 67 times | |
Total time: 0.002829 | |
Self time: 0.002829 | |
count total (s) self (s) | |
67 0.000516 let function_prefix = tolower(fnamemodify(a:name, ':r')) | |
67 0.000794 let function_prefix = substitute(function_prefix,'^vim-', '','') | |
67 0.000657 let function_prefix = substitute(function_prefix,'^unite-', 'unite#sources#','') | |
67 0.000563 let function_prefix = substitute(function_prefix,'-', '_', 'g') | |
67 0.000154 return function_prefix | |
FUNCTION neobundle#config#get() | |
Called 198 times | |
Total time: 0.001070 | |
Self time: 0.001070 | |
count total (s) self (s) | |
198 0.000926 return get(s:neobundles, a:name, {}) | |
FUNCTION neobundle#config#rtp_rm() | |
Called 106 times | |
Total time: 0.004377 | |
Self time: 0.004377 | |
count total (s) self (s) | |
106 0.002676 execute 'set rtp-='.fnameescape(a:bundle.rtp) | |
106 0.000961 if isdirectory(a:bundle.rtp.'/after') | |
7 0.000173 execute 'set rtp-='.fnameescape(a:bundle.rtp.'/after') | |
7 0.000007 endif | |
FUNCTION neobundle#util#substitute_path_separator() | |
Called 1 time | |
Total time: 0.000006 | |
Self time: 0.000006 | |
count total (s) self (s) | |
1 0.000006 return (s:is_windows && a:path =~ '\\') ? substitute(a:path, '\\', '/', 'g') : a:path | |
FUNCTION neobundle#util#split_rtp() | |
Called 31 times | |
Total time: 0.001171 | |
Self time: 0.001171 | |
count total (s) self (s) | |
31 0.000125 let rtp = a:0 ? a:1 : &runtimepath | |
31 0.000140 if type(rtp) == type([]) | |
return rtp | |
endif | |
31 0.000299 if rtp !~ '\\' | |
31 0.000457 return split(rtp, ',') | |
endif | |
let split = split(rtp, '\\\@<!\%(\\\\\)*\zs,') | |
return map(split,'substitute(v:val, ''\\\([\\,]\)'', "\\1", "g")') | |
FUNCTION neobundle#config#rtp_add() | |
Called 15 times | |
Total time: 0.002739 | |
Self time: 0.001083 | |
count total (s) self (s) | |
15 0.000066 if has_key(s:neobundles, a:bundle.name) | |
15 0.000763 0.000137 call neobundle#config#rtp_rm(s:neobundles[a:bundle.name]) | |
15 0.000015 endif | |
15 0.000046 let rtp = a:bundle.rtp | |
15 0.000107 if isdirectory(rtp) | |
" Join to the tail in runtimepath. | |
15 0.000678 0.000138 let rtps = neobundle#util#split_rtp(&runtimepath) | |
15 0.000789 0.000299 let &runtimepath = neobundle#util#join_rtp( insert(rtps, rtp, index(rtps, neobundle#get_rtp_dir())), &runtimepath, rtp) | |
15 0.000019 endif | |
15 0.000104 if isdirectory(rtp.'/after') | |
1 0.000022 execute 'set rtp+='.fnameescape(rtp.'/after') | |
1 0.000001 endif | |
FUNCTION neobundle#init#_bundle() | |
Called 100 times | |
Total time: 0.038178 | |
Self time: 0.024387 | |
count total (s) self (s) | |
100 0.000277 let bundle = a:bundle | |
100 0.000455 if !has_key(bundle, 'type') && get(bundle, 'local', 0) | |
" Default type. | |
let bundle.type = 'nosync' | |
endif | |
100 0.000271 if !has_key(bundle, 'type') | |
call neobundle#installer#error( printf('Failed parse name "%s" and args %s', a:bundle.orig_name, string(a:bundle.orig_opts))) | |
return {} | |
endif | |
100 0.000275 if get(bundle, 'lazy', 0) | |
call s:init_lazy(bundle) | |
endif | |
100 0.005159 0.001271 let bundle = extend(s:get_default(), bundle) | |
100 0.000298 if !has_key(bundle, 'name') | |
let bundle.name = neobundle#util#name_conversion(bundle.orig_name) | |
endif | |
100 0.000310 if !has_key(bundle, 'normalized_name') | |
100 0.001746 let bundle.normalized_name = substitute( fnamemodify(bundle.name, ':r'), '^vim-\|-vim$', '', 'g') | |
100 0.000126 endif | |
100 0.000445 if !has_key(bundle.orig_opts, 'name') && g:neobundle#enable_name_conversion | |
" Use normalized name. | |
let bundle.name = bundle.normalized_name | |
endif | |
100 0.000265 if !has_key(bundle, 'directory') | |
100 0.000304 let bundle.directory = bundle.name | |
100 0.000245 if bundle.rev != '' | |
let bundle.directory .= '_' . substitute(bundle.rev, '[^[:alnum:]_-]', '_', 'g') | |
endif | |
100 0.000068 endif | |
100 0.003087 0.001000 let bundle.base = s:expand_path(bundle.base) | |
100 0.001128 if bundle.base =~ '[/\\]$' | |
" Chomp. | |
let bundle.base = substitute(bundle.base, '[/\\]\+$', '', '') | |
endif | |
100 0.001098 let bundle.path = isdirectory(bundle.uri) ? bundle.uri : bundle.base.'/'.bundle.directory | |
100 0.000285 let rtp = bundle.rtp | |
" Check relative path. | |
100 0.001588 let bundle.rtp = (rtp =~ '^\%([~/]\|\a\+:\)') ? s:expand_path(rtp) : (bundle.path.'/'.rtp) | |
100 0.001141 if bundle.rtp =~ '[/\\]$' | |
" Chomp. | |
100 0.001582 let bundle.rtp = substitute(bundle.rtp, '[/\\]\+$', '', '') | |
100 0.000123 endif | |
100 0.000286 if bundle.normalized_name ==# 'neobundle' | |
" Do not add runtimepath. | |
1 0.000002 let bundle.rtp = '' | |
1 0.000001 endif | |
100 0.000214 if bundle.script_type != '' | |
" Add script_type. | |
" Note: To check by neobundle#config#is_installed(). | |
let bundle.path .= '/' . bundle.script_type | |
endif | |
100 0.000293 if !has_key(bundle, 'resettable') | |
100 0.000315 let bundle.resettable = !bundle.lazy | |
100 0.000093 endif | |
100 0.000273 if !has_key(bundle, 'augroup') | |
100 0.000317 let bundle.augroup = bundle.name | |
100 0.000087 endif | |
" Parse depends. | |
100 0.000257 if !empty(bundle.depends) | |
8 0.003239 call s:init_depends(bundle) | |
8 0.000006 endif | |
100 0.001506 0.000933 if get(neobundle#config#get(bundle.name), 'sourced', 0) | |
let bundle.sourced = 1 | |
endif | |
100 0.000139 return bundle | |
FUNCTION neobundle#parser#_init_bundle() | |
Called 100 times | |
Total time: 0.080200 | |
Self time: 0.007599 | |
count total (s) self (s) | |
100 0.004128 0.001842 let path = neobundle#util#expand( substitute(a:name, "['".'"]\+', '', 'g')) | |
100 0.007089 0.000994 let opts = s:parse_options(a:opts) | |
100 0.000317 if !has_key(opts, 'recipe') | |
100 0.000270 let opts.recipe = '' | |
100 0.000088 endif | |
100 0.026755 0.001318 let bundle = extend(neobundle#parser#path( path, opts), opts) | |
100 0.000295 if bundle.recipe != '' | |
call extend(bundle, neobundle#parser#_parse_recipe(bundle.recipe), 'keep') | |
endif | |
100 0.000328 let bundle.orig_name = a:name | |
100 0.000290 let bundle.orig_path = path | |
100 0.000244 let bundle.orig_opts = opts | |
100 0.032322 0.003679 let bundle = neobundle#init#_bundle(bundle) | |
100 0.000129 return bundle | |
FUNCTION neobundle#config#add() | |
Called 91 times | |
Total time: 0.107895 | |
Self time: 0.010644 | |
count total (s) self (s) | |
91 0.000258 if empty(a:bundle) | |
return | |
endif | |
91 0.000214 let bundle = a:bundle | |
91 0.000421 let is_force = get(a:000, 0, bundle.local) | |
91 0.000341 if !is_force && !bundle.overwrite && has_key(s:neobundles, bundle.name) | |
return | |
endif | |
91 0.000447 let prev_bundle = get(s:neobundles, bundle.name, {}) | |
91 0.000337 if get(prev_bundle, 'local', 0) && !bundle.local | |
return | |
endif | |
91 0.000206 if !empty(prev_bundle) | |
77 0.003723 0.000465 call neobundle#config#rtp_rm(prev_bundle) | |
77 0.000070 endif | |
91 0.000407 let s:neobundles[bundle.name] = bundle | |
91 0.001327 0.001187 if bundle.disabled || (bundle.gui && !has('gui_running')) || (bundle.terminal && has('gui_running')) || (bundle.vim_version != '' && s:check_version(bundle.vim_version)) || (!empty(bundle.external_commands) && s:check_external_commands(bundle)) | |
" Ignore load. | |
1 0.000002 return | |
endif | |
90 0.000212 if !empty(bundle.depends) | |
8 0.000297 0.000061 call s:add_depends(bundle) | |
8 0.000006 endif | |
90 0.000197 if !bundle.lazy && bundle.rtp != '' | |
13 0.000068 if !has('vim_starting') | |
" Load automatically. | |
13 0.061688 0.000197 call neobundle#config#source(bundle.name, bundle.force) | |
13 0.000013 else | |
let bundle.sourced = 1 | |
call neobundle#config#rtp_add(bundle) | |
if bundle.force | |
runtime! plugin/**/*.vim | |
endif | |
endif | |
13 0.000016 elseif bundle.lazy | |
76 0.032761 0.000635 call s:add_lazy(bundle) | |
76 0.000071 endif | |
90 0.000728 if !is_force && bundle.overwrite && !empty(prev_bundle) && prev_bundle.overwrite && bundle.orig_arg !=# prev_bundle.orig_arg && prev_bundle.resettable && prev_bundle.overwrite | |
" echomsg string(bundle.orig_arg) | |
" echomsg string(prev_bundle.orig_arg) | |
" Warning. | |
call neobundle#util#print_error( 'Overwrite previous neobundle configuration in ' . bundle.name) | |
endif | |
FUNCTION neobundle#get_neobundle_dir() | |
Called 116 times | |
Total time: 0.000390 | |
Self time: 0.000390 | |
count total (s) self (s) | |
116 0.000291 return s:neobundle_dir | |
FUNCTION neobundle#config#tsort() | |
Called 31 times | |
Total time: 0.000569 | |
Self time: 0.000569 | |
count total (s) self (s) | |
31 0.000077 let sorted = [] | |
31 0.000062 let mark = {} | |
31 0.000088 for target in a:bundles | |
call s:tsort_impl(target, a:bundles, mark, sorted) | |
endfor | |
31 0.000057 return sorted | |
FUNCTION neobundle#config#source() | |
Called 15 times | |
Total time: 0.080102 | |
Self time: 0.011027 | |
count total (s) self (s) | |
15 0.000083 let is_force = get(a:000, 0, 1) | |
15 0.000240 0.000129 let names = neobundle#util#convert2list(a:names) | |
15 0.017745 0.000187 let bundles = empty(names) ? neobundle#config#get_neobundles() : neobundle#config#search(names) | |
15 0.021877 0.000150 let not_exists = neobundle#config#check_not_exists(names) | |
15 0.000041 if !empty(not_exists) | |
call neobundle#util#print_error( 'Not installed plugin-names are detected : '. string(not_exists)) | |
endif | |
15 0.000670 0.000091 let rtps = neobundle#util#split_rtp() | |
15 0.000444 0.000235 let bundles = filter(bundles, "!neobundle#config#is_sourced(v:val.name) || (v:val.rtp != '' && index(rtps, v:val.rtp) < 0)") | |
15 0.000033 if empty(bundles) | |
return | |
endif | |
15 0.000039 let filetype_out = '' | |
15 0.000071 redir => filetype_out | |
15 0.000119 silent filetype | |
15 0.000069 redir END | |
15 0.000058 redir => filetype_before | |
15 0.000419 execute 'silent autocmd FileType' &filetype | |
15 0.000063 redir END | |
15 0.000045 let reset_ftplugin = 0 | |
30 0.000066 for bundle in bundles | |
15 0.000039 let bundle.sourced = 1 | |
15 0.000031 let bundle.disabled = 0 | |
15 0.000072 if !get(s:sourced_neobundles, bundle.name, 0) | |
" Unmap dummy mappings. | |
15 0.000071 for [mode, mapping] in get(bundle, 'dummy_mappings', []) | |
silent! execute mode.'unmap' mapping | |
endfor | |
" Delete dummy commands. | |
16 0.000068 for command in get(bundle, 'dummy_commands', []) | |
1 0.000009 silent! execute 'delcommand' command | |
1 0.000001 endfor | |
15 0.000077 let s:sourced_neobundles[bundle.name] = 1 | |
15 0.000018 endif | |
15 0.000043 let bundle.dummy_mappings = [] | |
15 0.000037 let bundle.dummy_commands = [] | |
15 0.002922 0.000183 call neobundle#config#rtp_add(bundle) | |
15 0.019001 0.000121 call neobundle#autoload#source(bundle.name) | |
15 0.000075 if exists('g:loaded_neobundle') || is_force | |
15 0.001336 0.000113 call neobundle#call_hook('on_source', bundle) | |
" Reload script files. | |
26 0.000620 for directory in filter( ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'], "isdirectory(bundle.rtp.'/'.v:val)") | |
26 0.002271 for file in split(glob(bundle.rtp.'/'.directory.'/**/*.vim'), '\n') | |
15 0.005947 0.001221 silent! source `=file` | |
15 0.000030 endfor | |
11 0.000010 endfor | |
15 0.000120 if exists('#'.bundle.augroup.'#VimEnter') | |
execute 'silent doautocmd' bundle.augroup 'VimEnter' | |
if has('gui_running') && &term ==# 'builtin_gui' | |
execute 'silent doautocmd' bundle.augroup 'GUIEnter' | |
endif | |
endif | |
15 0.000011 endif | |
15 0.000030 if !reset_ftplugin | |
15 0.000125 for filetype in split(&filetype, '\.') | |
for directory in ['ftplugin', 'indent', 'syntax', 'after/ftplugin', 'after/indent', 'after/syntax'] | |
let base = bundle.rtp . '/' . directory | |
if filereadable(base.'/'.filetype.'.vim') || (directory =~# 'ftplugin$' && isdirectory(base . '/' . filetype) || glob(base.'/'.filetype.'_*.vim') != '') | |
let reset_ftplugin = 1 | |
break | |
endif | |
endfor | |
endfor | |
15 0.000013 endif | |
15 0.000026 endfor | |
15 0.000079 redir => filetype_after | |
15 0.000398 execute 'silent autocmd FileType' &filetype | |
15 0.000069 redir END | |
15 0.000026 if reset_ftplugin | |
filetype off | |
if filetype_out =~# 'detection:ON' | |
silent! filetype on | |
endif | |
if filetype_out =~# 'plugin:ON' | |
silent! filetype plugin on | |
endif | |
if filetype_out =~# 'indent:ON' | |
silent! filetype indent on | |
endif | |
" Reload filetype plugins. | |
let &l:filetype = &l:filetype | |
elseif filetype_before !=# filetype_after | |
execute 'doautocmd FileType' &filetype | |
endif | |
15 0.000056 if exists('g:loaded_neobundle') | |
15 0.001470 0.000147 call neobundle#call_hook('on_post_source', bundles) | |
15 0.000014 endif | |
FUNCTION neobundle#get() | |
Called 7 times | |
Total time: 0.000086 | |
Self time: 0.000050 | |
count total (s) self (s) | |
7 0.000082 0.000046 return neobundle#config#get(a:name) | |
FUNCTION neobundle#util#set_default() | |
Called 3 times | |
Total time: 0.000062 | |
Self time: 0.000062 | |
count total (s) self (s) | |
3 0.000018 if !exists(a:var) || type({a:var}) != type(a:val) | |
3 0.000013 let alternate_var = get(a:000, 0, '') | |
3 0.000022 let {a:var} = exists(alternate_var) ? {alternate_var} : a:val | |
3 0.000003 endif | |
FUNCTION neobundle#installer#_load_install_info() | |
Called 15 times | |
Total time: 0.002214 | |
Self time: 0.002160 | |
count total (s) self (s) | |
15 0.000192 0.000138 let install_info_path = neobundle#get_neobundle_dir() . '/.neobundle/install_info' | |
15 0.000069 if !exists('s:install_info') | |
1 0.000003 let s:install_info = {} | |
1 0.000022 if filereadable(install_info_path) | |
1 0.000003 try | |
1 0.000128 let list = readfile(install_info_path) | |
1 0.000006 let ver = list[0] | |
1 0.000870 sandbox let s:install_info = eval(list[1]) | |
1 0.000007 if ver !=# s:install_info_version || type(s:install_info) != type({}) | |
let s:install_info = {} | |
endif | |
1 0.000001 catch | |
endtry | |
1 0.000001 endif | |
1 0.000001 endif | |
15 0.000458 call map(a:bundles, "extend(v:val, get(s:install_info, v:val.name, { 'checked_time' : localtime(), 'updated_time' : localtime(), 'installed_uri' : v:val.uri, 'installed_path' : v:val.path, 'revisions' : {},}))") | |
15 0.000032 return s:install_info | |
FUNCTION neobundle#config#search() | |
Called 45 times | |
Total time: 0.032880 | |
Self time: 0.020930 | |
count total (s) self (s) | |
" For infinite loop. | |
45 0.000215 let self = get(a:000, 0, []) | |
45 0.000092 let _ = [] | |
60 0.020384 0.019594 for bundle in copy(filter(neobundle#config#get_neobundles(), 'index(self, v:val.name) < 0 && index(a:bundle_names, v:val.name) >= 0')) | |
15 0.000087 call add(self, bundle.name) | |
15 0.000171 let _ += neobundle#config#search( map(copy(bundle.depends), 'v:val.name'), self) | |
15 0.000071 call add(_, bundle) | |
15 0.000033 endfor | |
45 0.003132 0.000333 return neobundle#util#uniq(_) | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
77 0.117872 0.004531 neobundle#parser#lazy() | |
91 0.107895 0.010644 neobundle#config#add() | |
100 0.080200 0.007599 neobundle#parser#_init_bundle() | |
15 0.080102 0.011027 neobundle#config#source() | |
22 0.079014 0.000548 neobundle#parser#bundle() | |
100 0.038178 0.024387 neobundle#init#_bundle() | |
45 0.032880 0.020930 neobundle#config#search() | |
100 0.025437 0.007343 neobundle#parser#path() | |
15 0.021727 0.001138 neobundle#config#check_not_exists() | |
15 0.020109 0.000875 neobundle#get_not_installed_bundles() | |
15 0.018880 0.009877 neobundle#autoload#source() | |
15 0.014313 0.005011 neobundle#config#fuzzy_search() | |
3 0.008816 0.002334 neobundle#autoload#function() | |
1 0.007577 0.000293 neobundle#rc() | |
1 0.007284 0.000622 neobundle#init#_rc() | |
1359 0.006752 neobundle#util#convert2list() | |
1 0.005948 0.002484 neobundle#config#init() | |
18 0.005601 0.000215 neobundle#config#source_bundles() | |
75 0.004844 neobundle#util#uniq() | |
19 0.004592 neobundle#config#get_autoload_bundles() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
100 0.038178 0.024387 neobundle#init#_bundle() | |
45 0.032880 0.020930 neobundle#config#search() | |
15 0.080102 0.011027 neobundle#config#source() | |
91 0.107895 0.010644 neobundle#config#add() | |
15 0.018880 0.009877 neobundle#autoload#source() | |
100 0.080200 0.007599 neobundle#parser#_init_bundle() | |
100 0.025437 0.007343 neobundle#parser#path() | |
1359 0.006752 neobundle#util#convert2list() | |
15 0.014313 0.005011 neobundle#config#fuzzy_search() | |
75 0.004844 neobundle#util#uniq() | |
19 0.004592 neobundle#config#get_autoload_bundles() | |
77 0.117872 0.004531 neobundle#parser#lazy() | |
106 0.004377 neobundle#config#rtp_rm() | |
67 0.002829 neobundle#parser#_function_prefix() | |
116 0.002795 neobundle#util#expand() | |
1 0.005948 0.002484 neobundle#config#init() | |
3 0.008816 0.002334 neobundle#autoload#function() | |
31 0.003034 0.002253 neobundle#call_hook() | |
15 0.002214 0.002160 neobundle#installer#_load_install_info() | |
100 0.002047 neobundle#config#get_types() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment