denite.nvim
denite.nvim copied to clipboard
performance profile
set rtp+=~/work/denite.nvim
"set rtp+=~/work/vim-hug-neovim-rpc
"set rtp+=~/work/nvim-yarp
au FileType denite call s:denite_mappings()
function! s:denite_mappings() abort
nnoremap <silent><buffer><expr> <CR>
\ denite#do_map('do_action')
nnoremap <silent><buffer><expr> <Tab>
\ denite#do_map('choose_action')
nnoremap <silent><buffer><expr> d
\ denite#do_map('do_action', 'delete')
nnoremap <silent><buffer><expr> p
\ denite#do_map('do_action', 'preview')
nnoremap <silent><buffer><expr> q
\ denite#do_map('quit')
nnoremap <silent><buffer><expr> i
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <Space>
\ denite#do_map('toggle_select').'j'
endfunction
call denite#custom#option('default', {
\ 'auto_resize': 1,
\ 'statusline': 0,
\ 'reversed': 0,
\ 'match_highlight': 1,
\ 'filter_updatetime': 100,
\ })
autocmd FileType denite-filter call s:denite_filter_my_settings()
function! s:denite_filter_my_settings() abort
inoremap <silent><buffer><expr> <C-j> denite#incremant_parent_cursor(1)
inoremap <silent><buffer><expr> <C-k> denite#incremant_parent_cursor(-1)
nnoremap <silent><buffer><expr> <C-j> denite#incremant_parent_cursor(1)
nnoremap <silent><buffer><expr> <C-k> denite#incremant_parent_cursor(-1)
endfunction
autocmd VimEnter * call s:profile()
function! s:profile() abort
let start = reltime()
Denite file::~/test/test1000
echomsg reltimestr(reltime(start))
let start = reltime()
Denite file::~/test/test10000
echomsg reltimestr(reltime(start))
let start = reltime()
Denite file::~/test/test100000
echomsg reltimestr(reltime(start))
endfunction
$ mkdir ~/test
$ cd ~/test
$ mkdir test1000 test10000 test100000
$ cd test1000
$ touch {1..1000}
$ cd ..
$ touch {1..10000}
$ cd ..
$ touch {1..100000}
$ cd ..
$ nvim -u test.nvimrc
My environment
test1000: 0.46s test10000: 2.6571474s test100000: 27s
I think the main problem is neovim block.
It will be fixed in the next plugin.