Created
March 17, 2014 19:52
-
-
Save vheon/9606919 to your computer and use it in GitHub Desktop.
youcompleteme#Enable() profiling
This file contains hidden or 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 youcompleteme#Enable() | |
Called 1 time | |
Total time: 3.093259 | |
Self time: 3.092362 | |
count total (s) self (s) | |
" When vim is in diff mode, don't run | |
1 0.000005 if &diff | |
return | |
endif | |
1 0.000061 0.000022 call s:SetUpBackwardsCompatibility() | |
1 0.000057 py import sys | |
1 0.000039 py import vim | |
1 0.000068 exe 'python sys.path.insert( 0, "' . s:script_folder_path . '/../python" )' | |
1 0.617316 py from ycm import utils | |
1 0.005921 py utils.AddThirdPartyFoldersToSysPath() | |
1 0.449559 py from ycm import base | |
1 0.032073 py base.LoadJsonDefaultsIntoVim() | |
1 0.000141 py from ycm import vimsupport | |
1 0.000042 py from ycm import user_options_store | |
1 0.000980 py user_options_store.SetAll( base.BuildServerConf() ) | |
1 0.000075 if !pyeval( 'base.CompatibleWithYcmCore()') | |
echohl WarningMsg | echomsg "YouCompleteMe unavailable: YCM support libs too old, PLEASE RECOMPILE" | echohl None | |
return | |
endif | |
1 1.922591 py from ycm.youcompleteme import YouCompleteMe | |
1 0.062666 py ycm_state = YouCompleteMe( user_options_store.GetAll() ) | |
1 0.000182 0.000087 call s:SetUpCpoptions() | |
1 0.000065 0.000017 call s:SetUpCompleteopt() | |
1 0.000303 0.000019 call s:SetUpKeyMappings() | |
1 0.000003 if g:ycm_show_diagnostics_ui | |
1 0.000045 0.000023 call s:TurnOffSyntasticForCFamily() | |
1 0.000001 endif | |
1 0.000214 0.000021 call s:SetUpSigns() | |
1 0.000095 0.000017 call s:SetUpSyntaxHighlighting() | |
1 0.000004 if g:ycm_allow_changing_updatetime | |
1 0.000016 set ut=2000 | |
1 0.000002 endif | |
1 0.000012 augroup youcompleteme | |
1 0.000276 autocmd! | |
1 0.000030 autocmd CursorMovedI * call s:OnCursorMovedInsertMode() | |
1 0.000016 autocmd CursorMoved * call s:OnCursorMovedNormalMode() | |
" Note that these events will NOT trigger for the file vim is started with; | |
" so if you do "vim foo.cc", these events will not trigger when that buffer | |
" is read. This is because youcompleteme#Enable() is called on VimEnter and | |
" that happens *after" BufRead/BufEnter has already triggered for the | |
" initial file. | |
" We also need to trigger buf init code on the FileType event because when | |
" the user does :enew and then :set ft=something, we need to run buf init | |
" code again. | |
1 0.000056 autocmd BufRead,BufEnter,FileType * call s:OnBufferVisit() | |
1 0.000013 autocmd BufUnload * call s:OnBufferUnload( expand( '<afile>:p' ) ) | |
1 0.000028 autocmd CursorHold,CursorHoldI * call s:OnCursorHold() | |
1 0.000016 autocmd InsertLeave * call s:OnInsertLeave() | |
1 0.000015 autocmd InsertEnter * call s:OnInsertEnter() | |
1 0.000015 autocmd VimLeave * call s:OnVimLeave() | |
1 0.000004 augroup END | |
" Calling this once solves the problem of BufRead/BufEnter not triggering for | |
" the first loaded file. This should be the last command executed in this | |
" function! | |
1 0.000174 0.000036 call s:OnBufferVisit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment