Open photon3108 opened 4 years ago
I'm not able to repro. My memory usage stays reasonably low when I jump to definition on MaterialApp
. One difference I suspect might be in play is that I've done some local development in my checkout of flutter.
My initial hunch is that what you are seeing is a huge number of false analyzer diagnostics come back for the files in the flutter package.
When you get into this state could you try running :LSClientAllDiagnostics
and see if anything shows up? In my test nothing shows up, because all of the flutter package is analyzable without errors, and sow is the default app from flutter create
.
If you get a bunch of stuff showing up here then we'll know the root cause and I can start thinking about a fix.
My vim process uses about 700MB resistant memory and makes GoToDefinition(ctrl+]) slower each time. I tried to figure out what happened but I'm not familiar with vim debug tools and vim scripts. I reassigned empty string to the buffer and it shows its length 0. But it doesn't work. I'm not sure if it holds the 700MB array under the implementation or not.
prabirshrestha/vim-lsp
doesn't have this problem in this kind of server-client async design. It means the memory leak could be resolved in this design. But it doesn't integrate dart very well.The reproducing steps are
OS: Ubuntu 16.04 VIM: 8.1 1-2292 VIM Plugin: 'dart-lang/dart-vim-plugin' 'natebosch/vim-lsc' 'natebosch/vim-lsc-dart' let g:lsc_server_commands = {'dart': 'dart_language_server'} let g:lsc_reference_highlights = v:false