Closed mMontu closed 5 years ago
But I don't notice any speed up when using the command on directories with a small number of files
If the files are small, it does not any speed up. You should know it...
cache threshold feature is not magic.
cache threshold feature is not magic.
That much I guessed. What surprised me is that is seems irrelevant. No noticeable change in both large and small directories.
The disk cache is available and the improvement is n nt so big. I don't implement the feature until recently. Because the advantage is not so big like you have shocked.
The cache is useful for only 100k level files.
I see. I expected it to be far quicker, close to instant response, by just reading the variable contents into the buffer. Maybe the extra delay is due to the transfer between python and VimL. But I guess there is something else wrong, unrelated to cache: just profiled DeniteProjectDir -root-markers='*.sln,*.avrsln,*.atsln,index.wiki' file/rec
, which returned 112 files:
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 3.869510 0.000259 denite#helper#call_denite()
1 3.823575 0.000163 denite#start()
1 3.823412 0.000297 <SNR>211_start()
1 3.822127 1.033573 denite#vim#_start()
Unfortunately it doesn't give enough information about the slowest part:
FUNCTION denite#vim#_start()
Defined: ~/.vim/bundle/denite.nvim/autoload/denite/vim.vim line 33
Called 1 time
Total time: 3.822127
Self time: 1.033573
count total (s) self (s)
1 0.000006 python3 << EOF
def _temporary_scope():
nvim = denite.rplugin.Neovim(vim)
try:
buffer_name = nvim.eval('a:context')['buffer_name']
if nvim.eval('a:context')['buffer_name'] not in denite__uis:
denite__uis[buffer_name] = denite.ui.default.Default(nvim)
denite__uis[buffer_name].start(
denite.rplugin.reform_bytes(nvim.eval('a:sources')),
denite.rplugin.reform_bytes(nvim.eval('a:context')),
)
except Exception as e:
import traceback
for line in traceback.format_exc().splitlines():
denite.util.error(nvim, line)
denite.util.error(nvim, 'Please execute :messages command.')
_temporary_scope()
if _temporary_scope in dir():
del _temporary_scope
EOF
1 0.000013 return []
Is there any verbose options on the plugin to help on this? I found :help denite-map-print_messages
in the docs, but it didn't seems applicable.
Smaller when using Denite file/rec
alone:
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 2.024810 0.000300 denite#helper#call_denite()
1 1.999972 0.000221 denite#start()
1 1.999751 0.000234 <SNR>231_start()
1 1.998348 1.202788 denite#vim#_start()
I don't reproduce the problem. So, I cannot help you.
Is there any verbose options on the plugin to help on this? I found :help denite-map-print_messages in the docs, but it didn't seems applicable.
Nothing.
DeniteProjectDir
searches the root marker from parent directory.
So, I think your directory is not so small.
You should see the issue template. Your report is not reproduce-able for other people. Unfortunately, I will ignore non reproduce-able report.
I don't reproduce the problem.
OK, makes perfect sense. I'll try to find a minimal setup to reproduce it and create a new issue. Thanks for your help!
Problems summary
I'm probably missing some obvious detail, but setting the
cache_threshold
mentioned in:help denite-source-file_rec
causes an error and make:Denite file/rec
fail.Changing this to
threshold = int(self.vars['cache_threshold'])
avoid the error message. But I don't notice any speed up when using the command on directories with a small number of files (withag
as the file/rec command, as the first lines in:help denite-examples
).Environment Information (Required!)
denite version (SHA1): db2d7c30
OS: linux (Salix)
Vim/neovim version: VIM - Vi IMproved 8.1 - Included patches: 1-431 Huge version with GTK3 GUI.
:checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim with less than 50 lines (Required!)
Reproducible without init file.
How to reproduce problems from neovim startup (Required!)