Closed vzytoi closed 1 year ago
That does look like a pretty slow startup time. However, based on the fact that your config spends 160ms in loading tabnine
, I'm suspicious that the long load time for packer_compiled
is due to loading your tabnine
config. What happens when you disable that plugin?
I'm also getting super slow startup all of a sudden, and it's only packer_compiled.lua
that's taking a while. is there a way to profile what it's doing?
startup: 738.7
event time percent plot
packer_compiled.lua 680.68 92.15 ██████████████████████████
filetype.vim 7.76 1.05 ▎
init.lua 7.04 0.95 ▎
loading packages 5.40 0.73 ▎
cmp.lua 4.40 0.60 ▏
loading rtp plugins 4.06 0.55 ▏
first screen update 3.87 0.52 ▏
reading ShaDa 3.45 0.47 ▏
parsing arguments 3.42 0.46 ▏
sourcing vimrc file( 2.85 0.39 ▏
VimEnter autocommand 2.07 0.28 ▏
done waiting for UI 1.94 0.26 ▏
dash.vim 1.46 0.20
nvim-treesitter.vim 1.40 0.19
opening buffers 1.30 0.18
nvim-treesitter-text 1.25 0.17
expanding arguments 1.18 0.16
loading after plugin 1.10 0.15
matchit.vim 0.89 0.12
locale set 0.70 0.09
init highlight 0.60 0.08
cmp_path.lua 0.52 0.07
syntax.vim 0.47 0.06
inits 1 0.43 0.06
dressing.lua 0.41 0.06
cmp_buffer.lua 0.39 0.05
netrwPlugin.vim 0.31 0.04
sleuth.vim 0.28 0.04
before starting main 0.23 0.03
move.vim 0.21 0.03
indent_blankline.vim 0.21 0.03
cmp_luasnip.lua 0.20 0.03
rplugin.vim 0.19 0.03
rainbow.vim 0.19 0.03
eunuch.vim 0.19 0.03
tldr.vim 0.18 0.02
cmp_nvim_lsp_signatu 0.17 0.02
matchit.vim 0.17 0.02
luasnip.vim 0.16 0.02
gzip.vim 0.14 0.02
matchparen.vim 0.13 0.02
cmp_nvim_lua.lua 0.13 0.02
zipPlugin.vim 0.12 0.02
clipboard.vim 0.12 0.02
startuptime.vim 0.11 0.01
tarPlugin.vim 0.10 0.01
nvim-tree-startup.lu 0.09 0.01
init default autocom 0.09 0.01
tohtml.vim 0.08 0.01
telescope.vim 0.08 0.01
shada.vim 0.07 0.01
tagalong.vim 0.07 0.01
synload.vim 0.06 0.01
ftplugin.vim 0.06 0.01
legendary.lua 0.06 0.01
BufEnter autocommand 0.06 0.01
man.vim 0.05 0.01
autocmds.vim 0.04 0.01
trouble.vim 0.04 0.01
cmp_nvim_lsp.lua 0.04 0.01
lspconfig.vim 0.04 0.01
filetype.lua 0.04 0.00
indent.vim 0.04 0.00
fish.vim 0.04 0.00
inits 2 0.03 0.00
bufdelete.vim 0.03 0.00
init default mapping 0.03 0.00
query.vim 0.02 0.00
spellfile.vim 0.02 0.00
nvim-web-devicons.vi 0.02 0.00
plenary.vim 0.02 0.00
graphql.vim 0.02 0.00
tlaplus.vim 0.02 0.00
tutor.vim 0.02 0.00
colorizer.vim 0.02 0.00
ql.vim 0.02 0.00
surface.vim 0.02 0.00
todo.vim 0.02 0.00
executing command ar 0.02 0.00
jsonc.vim 0.02 0.00
hcl.vim 0.02 0.00
ledger.vim 0.02 0.00
yang.vim 0.02 0.00
prisma.vim 0.02 0.00
teal.vim 0.02 0.00
nix.vim 0.02 0.00
rplugin.vim 0.02 0.00
hack.vim 0.02 0.00
json5.vim 0.02 0.00
pug.vim 0.02 0.00
window checked 0.01 0.00
gdresource.vim 0.01 0.00
heex.vim 0.01 0.00
hjson.vim 0.01 0.00
gowork.vim 0.01 0.00
health.vim 0.01 0.00
snippets.vim 0.01 0.00
fusion.vim 0.01 0.00
gdscript.vim 0.01 0.00
glimmer.vim 0.01 0.00
glsl.vim 0.01 0.00
inits 3 0.01 0.00
--- NVIM STARTING -- 0.01 0.00
init screen for UI 0.01 0.00
UIEnter autocommands 0.00 0.00
waiting for UI 0.00 0.00
editing files in win 0.00 0.00
--- NVIM STARTED --- 0.00 0.00
Nevermind, I figured out my issue and it was me doing something dumb in my config.
@mrjones2014 can you elaborate a bit about "something dumb"?
I'm having packer_compiled.lua as top1 time sonsumer, but I don't think that anything in my config is dumb
:shrug:
I have sumneko lua LSP installed via brew
on Mac, and I was using a brew
command to dynamically get the version to put into lspconfig (since lua-language-server --version
was printing unknown
for me, not sure if that's just me or a known issue), and brew
is very slow.
I changed it to use ls
and grep
to get the version instead, which is a lot faster, and I'm also lazy-loading LSP configs with autocommands, based on filetype (e.g. sumneko lua gets loaded only if I open a lua file). See dotfiles: https://github.com/mrjones2014/dotfiles/blob/master/.config/nvim/lua/lsp/init.lua#L31-L50
Hey! I'm having issue concerning my vim startuptime, this issue had already been asked here : #191 but it didn't helped my case. I'm just wandering if this startuptime is slow or if it is in fact normal and if it's not, how can I make it faster? Here is my startuptime :
:StartupTime --tries 20
:nvim --version
:Features: -acl +iconv +tui See ":help feature-compile"
Run :checkhealth for more info
git version 2.33.1.windows.1
my configuration
```lua M = {} function M.config() local execute = vim.api.nvim_command local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path}) execute 'packadd packer.nvim' end return require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'Jorengarenar/vim-MvVis' use 'tpope/vim-surround' use 'romainl/vim-cool' use 'kyazdani42/nvim-web-devicons' use 'wellle/targets.vim' use 'SirVer/ultisnips' use 'nvim-lua/plenary.nvim' use 'onsails/lspkind-nvim' use 'ckipp01/stylua-nvim' use 'AndrewRadev/splitjoin.vim' use 'karb94/neoscroll.nvim' use 'dstein64/vim-startuptime' use { 'lewis6991/impatient.nvim', config = [[require('impatient')]] } use { 'hrsh7th/nvim-cmp', config = [[require('plugins.cmp').config()]], requires = { 'quangnguyen30192/cmp-nvim-ultisnips', 'hrsh7th/cmp-path', 'hrsh7th/cmp-calc' } } use { 'adrianiy/cmp-tabnine', run = './install.sh', config = [[require('plugins.cmp').tabnine_config()]], requires = 'hrsh7th/nvim-cmp' } use { 'windwp/nvim-autopairs', config = function() require('nvim-autopairs').setup{ check_ts = true, ts_config = { lua = {'string'}, javascript = {'template_string'} } } end } use { 'jaredgorski/spacecamp', event = 'GUIEnter' } use { 'justinmk/vim-sneak', keys = { {'n', 'S' }, {'n', 's'} } } use { 'LionC/nest.nvim', config = [[require('mappings')]], } use { 'cappyzawa/trim.nvim', event = 'BufWritePre', config = function() require('trim').setup({ disable = {"json", "javascript", "css"}, }) end } use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim', config = [[require('diffview').setup{}]], } use { 'akinsho/toggleterm.nvim', cmd = { "ToggleTerm", "TermExec" }, config = [[require 'plugins.term'.config()]], } use { 'hoob3rt/lualine.nvim', config = [[require 'plugins.lualine'.config()]], } use { 'RishabhRD/nvim-cheat.sh', requires = { 'RishabhRD/popfix' }, cmd = { 'Cheat' } } use { 'tpope/vim-fugitive', cmd = { 'G', 'Gdiff' } } use { 'nvim-telescope/telescope.nvim', config = [[require('plugins.telescope').config()]], } use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } use { 'nvim-treesitter/nvim-treesitter', event = 'BufRead', run = ':TSUpdate', config = [[require 'plugins.treesitter']], } use { 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' } use { 'RRethy/nvim-treesitter-textsubjects', after = 'nvim-treesitter' } use { 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' } use { 'windwp/nvim-ts-autotag', after = 'nvim-treesitter', config = [[require('nvim-ts-autotag').setup()]], ft = {'html', 'php'} } use { 'code-biscuits/nvim-biscuits', after = 'nvim-treesitter', config = function() require('nvim-biscuits').setup({ cursor_line_only = true, default_config = { prefix_string = "" } }) end } use { 'terrortylor/nvim-comment', config = function() require('nvim_comment').setup({ comment_empty = false, hook = function() require('ts_context_commentstring.internal').update_commentstring() end }) end, after = 'nvim-ts-context-commentstring' } use { 'neoclide/coc.nvim', branch = 'release', config = [[require('plugins.coc')]], event = 'VimEnter' } use { 'ThePrimeagen/harpoon', config = function() require("harpoon").setup({ global_settings = { save_on_toggle = false, save_on_change = true, enter_on_sendcmd = false, }, projects = { ["~\\Appdata\\Local\\nvim"] = { term = { cmds = { "ungit" } } } } }) end } use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' }, config = [[require('gitsigns').setup()]] } end) end return M ```Thanks a lot for your time and have a nice day ! (: