-
-
Notifications
You must be signed in to change notification settings - Fork 620
Finalise filesystem_watchers #1606
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
Comments
The case is that executing |
That is a good observation. No watchers may be a valid use case. This change should be reconsidered. Before we reject I would be grateful if you could run a performance test. I don't have a windows environment, however it would be very valuable to see what is happening; there may be problems with the watchers that can be fixed. Please enable profiling, run your large make and post the logs. |
Couldn't certain files be ignored by watchers? |
That would be a great solution. Watchers only know about the directory and don't see individual file changes, as they don't get the full inotify event. However... ignoring directories would work very nicely. We are (hardcoded) ignoring I'll be interested to see the results of @yehuohan profiling: perhaps there are some known bad or problematic directories on windows that we could document or defualt. See also #1670 |
I tested with building neovim 0.8 branch from msys2 with following commands saved into a mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=E:/nvim/neovim/install -G Ninja ..
ninja
ninja install
cd .. And run nvim-qt (nvim 0.8) with mini nvim config: let $DotVimDir=resolve(expand('<sfile>:p:h'))
set rtp^=$DotVimDir
call plug#begin($DotVimDir.'/bundle')
Plug 'kyazdani42/nvim-tree.lua'
call plug#end()
lua << EOF
local tcb = require('nvim-tree.config').nvim_tree_callback
require('nvim-tree').setup{
auto_reload_on_write = false,
log = {
enable = true,
truncate = true,
types = {
git = false,
profile = true,
},
},
filesystem_watchers = { enable = true },
diagnostics = { enable = false },
git = { enable = false },
}
EOF
The memory consumption of The detailed testing screen recording: without-nt.mp4
The memory consumption of with-nt.mp4The attached [2022-10-22 14:35:32] [profile] START draw
[2022-10-22 14:35:32] [profile] END draw 2ms
[2022-10-22 14:35:41] [profile] START draw
[2022-10-22 14:35:41] [profile] END draw 1ms
[2022-10-22 14:35:41] [profile] START draw
[2022-10-22 14:35:41] [profile] END draw 2ms
[2022-10-22 14:35:41] [profile] START draw
[2022-10-22 14:35:41] [profile] END draw 2ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 2ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 2ms
[2022-10-22 14:35:42] [profile] START draw
[2022-10-22 14:35:42] [profile] END draw 1ms
[2022-10-22 14:35:43] [profile] START draw
[2022-10-22 14:35:43] [profile] END draw 1ms
[2022-10-22 14:35:43] [profile] START draw
[2022-10-22 14:35:43] [profile] END draw 1ms
[2022-10-22 14:35:43] [profile] START draw
[2022-10-22 14:35:43] [profile] END draw 1ms
[2022-10-22 14:35:54] [profile] START draw
[2022-10-22 14:35:54] [profile] END draw 1ms
[2022-10-22 14:35:55] [profile] START draw
[2022-10-22 14:35:55] [profile] END draw 1ms
[2022-10-22 14:38:53] [profile] START draw
[2022-10-22 14:38:53] [profile] END draw 8ms
[2022-10-22 14:38:54] [profile] START draw
[2022-10-22 14:38:54] [profile] END draw 1ms
[2022-10-22 14:39:36] [profile] START draw
[2022-10-22 14:39:36] [profile] END draw 38ms By the way, it seemed running build commands with |
Thanks for the detailed demonstration. The problem is demonstrated and it's very useful to see that it is a meson style build. Unforntunately there's nothing useful in the log; I apologise for not specifying the full settings, which I will update in the readme now. Please can you re-run with:
I am hopeful that directory ignoring will resolve this. |
@alex-courtis I tested with the log setting you provide. The nvim-tree.log is attached below and is about 140Mb after unzip. |
Many thanks, that is incredibly useful. StoryIt's clear what's going on now: nvim-tree (implies nvim) doesn't have permissions to see these directories:
Can nvim open files in that directory? The permissions are something you might want to fix. Unfortunately I am not familiar with windows so I cannot offer any advice... Runtime FixFailures such as these must be handled. Proposal:
Configuration FixI examined my workflow on a meson/ninja project: I have Proposal: |
@yehuohan you could try this workaround, similar to my workflow:
1 might need some changes, perhaps |
@alex-courtis Sorry for late reply. I confirmed that nvim can access I also tested with |
It may be that there are many permission changes being made during that process, with some files being temporarily unreadable. Some aspect of the windows filesystem is likely the problem.
We have proven the concept. Using Many thanks @yehuohan for going through this process. We now have all the information and can build a complete solution. |
PR for ignore: #1705 @yehuohan I would be very grateful if you could test: #1705 (comment) |
Remove any codepaths that are conditional on either of these options.
Silently remove these options.
Update: there are genuine use cases for disabled watchers. Resolve remaining issues such as large directories.
Tasks:
filesystem_watchers.ignore
The text was updated successfully, but these errors were encountered: