Closed tzachar closed 3 years ago
This cuts my startup time from ~240 msec (with impatient) to ~220 msec
One problem with this is that it'll break with different app images. To get around that we need to include a fingerprint of the app image in the hash.
Well, as long as the mtime.sec
changes between app images, we are safe.
This seems to be the case, as after updating the app image:
Loading cache file /home/tzachar/.cache/nvim/luacache
Stale cache for module vim.treesitter.query
Creating cache for module vim.treesitter.query
Stale cache for module vim.treesitter.language
Creating cache for module vim.treesitter.language
Stale cache for module vim.treesitter
Creating cache for module vim.treesitter
Stale cache for module vim.treesitter.languagetree
Creating cache for module vim.treesitter.languagetree
Stale cache for module vim.uri
Creating cache for module vim.uri
Stale cache for module vim.lsp
Creating cache for module vim.lsp
Stale cache for module vim.lsp.handlers
Creating cache for module vim.lsp.handlers
Stale cache for module vim.lsp.log
Creating cache for module vim.lsp.log
Stale cache for module vim.lsp.protocol
Creating cache for module vim.lsp.protocol
Stale cache for module vim.lsp.util
Creating cache for module vim.lsp.util
Stale cache for module vim.highlight
Creating cache for module vim.highlight
Stale cache for module vim.lsp.buf
Creating cache for module vim.lsp.buf
Stale cache for module vim.lsp.rpc
Creating cache for module vim.lsp.rpc
Stale cache for module vim.lsp.diagnostic
Creating cache for module vim.lsp.diagnostic
Stale cache for module vim.lsp.codelens
Creating cache for module vim.lsp.codelens
Updating cache file: /home/tzachar/.cache/nvim/luacache
No cache for module telescope.path
and after a seconf run:
Loading cache file /home/tzachar/.cache/nvim/luacache
No cache for module telescope.path
Well, as long as the
mtime.sec
changes between app images, we are safe. This seems to be the case, as after updating the app image:
Easy way to test this is to grab the nightly build and see if the cache is updated correctly
just did that, see my comment above...
just did that, see my comment above...
I apologize, I mean for the automated tests we have in place :sweat_smile:
Thanks for implementing my idea by the way.
Add
pack
andunpack
formodpath
, abstracting away the fact that$APPDIR
changes on every execution