Open x49 opened 6 years ago
I also noticed that neovim-qt
leaves *.tex~
(and tey~
etc.) files behind after closing even with set nobackup
, which nvim
doesn't. May be related?
Disk trashing on a cold start could be nvim-qt loading the Qt shared libraries. Its strange that it would happen on exit.
If the problem is in fact writing to the shada file, can you take a look at it?
A quick test is to disable shada completely nvim -i NONE
Going further you can have a look at the contents of the shada file, e.g. in vimscript (taken from :h msgpackparse)
let fname = expand('~/.local/share/nvim/shada/main.shada')
let mpack = readfile(fname, 'b')
let shada_objects = msgpackparse(mpack)
echo shada_objects ...
I also noticed that neovim-qt leaves *.tex~ (and tey~ etc.) files behind after closing even with set nobackup, which nvim doesn't. May be related?
neovim-qt does not handle those files at all, it is always the nvim process doing that in the background.
Disabling shada does indeed make the problem go away. Here's the contents of the shada files. I openend the files as in the initial post, then
<down>4
a " type something
<Esc>:wq
[1, 1516344346, 72, {'pid': 8844, 'version': 'NVIM v0.2.2', 'encoding': 'utf-8', 'max_kbyte': 10, 'generator': 'nvim'}, 8, 1516344321, 33, {'f': '/home/me/tmp/
vimtex/main.tex'}, 8, 1516344346, 39, {'c': 13, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5}, 3, 0, 3, [''], 10, 1516344346, 39, {'c': 13, 'f': '/home/me/tmp/v
imtex/main.tex', 'l': 5}, 10, 1516344331, 42, {'c': 14, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5, 'n': 94}, 10, 1516344327, 42, {'c': 13, 'f': '/home/me/tmp
/vimtex/main.tex', 'l': 5, 'n': 46}, 11, 1516344327, 39, {'c': 13, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5}, 4, 1516344346, 6, [0, 'wq']]
[1, 1516344452, 72, {'pid': 9403, 'version': 'NVIM v0.2.2', 'encoding': 'utf-8', 'max_kbyte': 10, 'generator': 'nvim'}, 8, 1516344444, 33, {'f': '/home/me/tmp/
vimtex/main.tex'}, 8, 1516344450, 39, {'c': 15, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5}, 8, 1516344452, 39, {'c': 15, 'f': '/home/me/tmp/vimtex/main.tex',
'l': 5}, 3, 0, 3, [''], 10, 1516344452, 39, {'c': 15, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5}, 10, 1516344449, 42, {'c': 16, 'f': '/home/me/tmp/vimtex/ma
in.tex', 'l': 5, 'n': 94}, 10, 1516344449, 42, {'c': 15, 'f': '/home/me/tmp/vimtex/main.tex', 'l': 5, 'n': 46}, 11, 1516344449, 39, {'c': 15, 'f': '/home/me/tm
p/vimtex/main.tex', 'l': 5}, 4, 1516344450, 6, [0, 'wq']]
I encountered the issue as well. One side-effect is that if I try to shutdown my computer (Fedora rawhide, Plasma 5.12.90 but I had the issue with stable F28/Plasma 5.12 and F28/Openbox) :
path/to/shada
as it does not look like a shada file") then E136.rm
or :wshada!
)
Issue
When closing neovim-qt after editing a latex file with the vimtex plugin (https://github.com/lervag/vimtex) active, excessive disk i/o is noticeable. This process takes several seconds. This behaviour is not present when editing the same file with the same plugins directly in nvim (console).
MWE
Have files
nvimrc
withand
main.tex
withDelete any old shada files, for me this is
rm ~/.local/share/nvim/shada/*
. Open the file withnvim -u nvimrc main.tex
. Edit something, I added some words afterTest
. Then:wq
.nvim
exits quickly. Delete shada again, then open the same file withnvim-qt main.tex -- -u nvimrc
and edit it again. Then:wq
.nvim-qt
thrashes disk and takes a couple of seconds.I traced the accessed files with
fatrace
. Fornvim
, accessing the shada file starts at line 525, fornvim-qt
at line 1135.nvim-qt
shows many more uses of the shada file. The noise my hard drive makes when those accesses occur lets me know that that is what is causing the problem ;).nvim.fatrace.txt nvim-qt.fatrace.txt
Software: