Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance profile #803

Open
Shougo opened this issue Oct 9, 2020 · 2 comments
Open

performance profile #803

Shougo opened this issue Oct 9, 2020 · 2 comments

Comments

@Shougo
Copy link
Owner

Shougo commented Oct 9, 2020

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

@Shougo
Copy link
Owner Author

Shougo commented Oct 9, 2020

I think the main problem is neovim block.

@Shougo
Copy link
Owner Author

Shougo commented Jun 24, 2021

It will be fixed in the next plugin.

@Shougo Shougo reopened this Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant