Closed tzurita closed 2 years ago
More info.
packer.nvim
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Config for nvim-lspconfig took 4.30639ms Config for nvim-lsp-installer took 2.91688ms Config for galaxyline.nvim took 0.809015ms Config for persistence.nvim took 0.193003ms Config for nvim-mapper took 0.079263ms Defining lazy-load commands took 0.074974ms Config for dashboard-nvim took 0.055524ms Defining lazy-load event autocommands took 0.013374ms Defining packer_plugins took 0.004358ms Luarocks path setup took 0.001477ms try_loadstring definition took 0.000185ms
Hmmm, not sure what the issue is. The plugin configs themselves seem pretty fast. Do you mind posting your whole nvim --startuptime profile.log
cat ./profile.log
?
│ File: profile.log
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │
2 │
3 │ times in msec
4 │ clock self+sourced self: sourced script
5 │ clock elapsed: other lines
6 │
7 │ 000.004 000.004: --- NVIM STARTING ---
8 │ 000.202 000.198: locale set
9 │ 000.390 000.188: inits 1
10 │ 000.399 000.009: window checked
11 │ 002.533 002.134: parsing arguments
12 │ 002.565 000.032: expanding arguments
13 │ 002.583 000.018: inits 2
14 │ 002.875 000.292: init highlight
15 │ 002.876 000.001: waiting for UI
16 │ 003.426 000.550: done waiting for UI
17 │ 003.445 000.019: init screen for UI
18 │ 003.457 000.011: init default mappings
19 │ 003.507 000.050: init default autocommands
20 │ 003.569 000.012 000.012: sourcing /usr/share/nvim/archlinux.vim
21 │ 003.573 000.053 000.042: sourcing /etc/xdg/nvim/sysinit.vim
22 │ 005.421 000.018 000.018: sourcing /usr/share/nvim/runtime/autoload/netrw_gitignore.vim
23 │ 7987.283 004.049 004.049: sourcing /home/zuritat/.config/nvim/colors/doom-one.lua
24 │ 7987.821 7984.229 7980.162: sourcing /home/zuritat/.config/nvim/init.lua
25 │ 7987.830 000.041: sourcing vimrc file(s)
26 │ 7991.445 000.019 000.019: sourcing /usr/share/vim/vimfiles/ftdetect/lf.vim
27 │ 7991.531 003.661 003.642: sourcing /usr/share/nvim/runtime/filetype.vim
28 │ 7991.602 000.027 000.027: sourcing /usr/share/nvim/runtime/ftplugin.vim
29 │ 7991.667 000.024 000.024: sourcing /usr/share/nvim/runtime/indent.vim
30 │ 7991.793 000.055 000.055: sourcing /usr/share/nvim/runtime/syntax/synload.vim
31 │ 7991.860 000.174 000.119: sourcing /usr/share/nvim/runtime/syntax/syntax.vim
32 │ 7992.260 000.013 000.013: sourcing /usr/share/nvim/runtime/plugin/gzip.vim
33 │ 7992.282 000.010 000.010: sourcing /usr/share/nvim/runtime/plugin/health.vim
34 │ 7992.357 000.064 000.064: sourcing /usr/share/nvim/runtime/plugin/man.vim
35 │ 7992.669 000.130 000.130: sourcing /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim
36 │ 7992.731 000.361 000.230: sourcing /usr/share/nvim/runtime/plugin/matchit.vim
37 │ 7992.845 000.102 000.102: sourcing /usr/share/nvim/runtime/plugin/matchparen.vim
38 │ 7993.134 000.276 000.276: sourcing /usr/share/nvim/runtime/plugin/netrwPlugin.vim
39 │ 7993.269 000.008 000.008: sourcing /home/zuritat/.local/share/nvim/rplugin.vim
40 │ 7993.274 000.110 000.102: sourcing /usr/share/nvim/runtime/plugin/rplugin.vim
41 │ 7993.363 000.075 000.075: sourcing /usr/share/nvim/runtime/plugin/shada.vim
42 │ 7993.405 000.021 000.021: sourcing /usr/share/nvim/runtime/plugin/spellfile.vim
43 │ 7993.436 000.014 000.014: sourcing /usr/share/nvim/runtime/plugin/tarPlugin.vim
44 │ 7993.463 000.010 000.010: sourcing /usr/share/nvim/runtime/plugin/tohtml.vim
45 │ 7993.493 000.015 000.015: sourcing /usr/share/nvim/runtime/plugin/tutor.vim
46 │ 7993.525 000.013 000.013: sourcing /usr/share/nvim/runtime/plugin/zipPlugin.vim
47 │ 7993.983 000.393 000.393: sourcing /usr/share/vim/vimfiles/plugin/fzf.vim
48 │ 7994.095 000.078 000.078: sourcing /usr/share/vim/vimfiles/plugin/redact_pass.vim
49 │ 8003.621 009.475 009.475: sourcing /home/zuritat/.config/nvim/plugin/packer_compiled.lua
50 │ 8003.776 001.030: loading rtp plugins
51 │ 8004.062 000.173 000.173: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/start/dashboard-nvim/plugin/dashboard.vim
52 │ 8004.270 000.086 000.086: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/start/galaxyline.nvim/plugin/galaxyline.lua
53 │ 8004.390 000.062 000.062: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer/plugin/nvim-lsp-installer.vim
54 │ 8005.023 000.544 000.544: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/start/nvim-lspconfig/plugin/lspconfig.vim
55 │ 8005.153 000.511: loading packages
56 │ 8005.155 000.002: loading after plugins
57 │ 8005.168 000.013: inits 3
58 │ 8005.895 000.727: reading ShaDa
59 │ 8006.696 000.293 000.293: sourcing /usr/share/nvim/runtime/scripts.vim
60 │ 8007.014 000.055 000.055: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/opt/DAPInstall.nvim/plugin/dicmds.vim
61 │ 8013.864 001.010 001.010: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/opt/kommentary/plugin/kommentary.vim
62 │ 8014.246 000.029 000.029: sourcing /home/zuritat/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons/plugin/nvim-web-devicons.vim
63 │ 8015.775 008.493: opening buffers
64 │ 8016.030 000.255: BufEnter autocommands
65 │ 8016.033 000.003: editing files in windows
66 │ 8017.312 001.279: VimEnter autocommands
67 │ 8017.314 000.003: UIEnter autocommands
68 │ 8017.594 000.206 000.206: sourcing /usr/share/nvim/runtime/autoload/provider/clipboard.vim
69 │ 8017.600 000.080: before starting main loop
70 │ 8021.105 003.505: first screen update
71 │ 8021.108 000.002: --- NVIM STARTED ---
Ok, it looks like most of the slowdown is when sourcing doom-one colourscheme (misread this, actually when sourcing neovim's ./init.lua. @NTBBloodbath might be better for solving this issue. Did you port the colourscheme yourself @NTBBloodbath? Also @tzurita could you post the output of :DoomInfo
just so we get some info on your environment.
Also, after the re-write I prefered to start from scratch.
rm -Rf .cache/nvim .config/nvim .local/share/nvim git clone --depth 1 https://github.com/NTBBloodbath/doom-nvim.git ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
It used to work prior to the change to 3 files doom_[config|modules|userplugins].lua
Here it the profile.log
I am also experiencing a bit of a slow start on fresh main. Dunno if it is the same problem.
Hmm this is really bizarre. I'm on the latest main and my startup seems to be ok (but I'm on MacOS). I even tried it in my archlinux docker image and it's fine (slow because docker but not as slow as you're getting). Do you mind posting your doom_modules.lua
folder? And also I'm not sure which commit you're refering to, do you know the commit sha or exact message? (Or are you referring to the v3.2.0 release?)
I am on commit 3f326a7b431e84bc2f2c235395d68489e590e57d
Just uncommented portion:
Hi, sorry for my very late response (I've been really occupied this week).
Thanks for providing that useful information and also thanks to @connorgmeehan for helping! :)
Is it fine if I help debugging this next week? I could start helping here on monday because I'll not be free this entire weekend. This behavior is definitely very odd, mine boots on 200ms or less so yeah we need to debug this 🤔
Here are some differences between
My doom_modules.lua vs Original doom_modules.lua. Even without the language server +lsp or +debug it is still very slow. randomly but consistently slow.
my doom_modules.lua < vs > original doom_modules.lua
This is still very strange to me. I don't think this is caused by any doom_module in particular although have you tried disabling everything and does the error still occur?
What type of disk drive are you using? Calls to the file system are very expensive and could be the cause of the slowdown.
Also could you try checking out previous commits in the history and pinpoint which commit this error started occuring?
I know it's a pain but I can't re-create this issue so I just need a lead on where it could be occuring.
Yes, and I am beginning to agree with you. I am starting to think it is not my doom_modules.lua and I doubt it is the HW. I Just re-installed from scratch but have 3 systems I am testing on and ALL are experiencing the issue. Here is one of them
Wow yeah that should have no problem. I just tried again in my archlinux docker image and I just can't re-create this issue.
Here's my --startuptime
Ok so here is what I have discovered thus far.
Nov 30 - ed5a8e5953492df18c1ab058c2222c085d9399ab Loads in .022 seconds
Dec 10 - 5631ee317556d0c15bb321a55847abdb86d6fafc - FAST other than issue below Loads in .027 seconds
Dec 12 - 685151c3f134874854d22a91051b8b52e6fabb4b - Slow 1X >7 sec starup sometimes. NOT consistent. All other times .027 seconds
Dec 13 - skipped
Dec 15 - 3f326a7b431e84bc2f2c235395d68489e590e57d - Slow startup > 7 seconds w/o modifying any config file. Sometimes .080 seconds so it is not consistent. This is vanilla install no mods to config files
Hi, it's me again as I promised haha.
It seems that sourcing netrw_gitignore.vim
takes A LOT of time for you. I'll deep dive into that issue to stop sourcing that file if netrw isn't being used as the user file explorer because yeah sourcing something that isn't being used doesn't make any sense.
Regarding to colorscheme taking a ton of time I have no idea, are you using the defaults for doom-one? This behavior is being really weird to me 🤔.
Yes, defaults are being used. I thought it was the lsp portion of it but it happens when I do a fresh install on all my systems. I have a Lenovo Carbon X1 Gen6 w/ SSD, Carbon X1 Gen9 w/ M2, and a Dell Precision Tower with M2
Hmm alright, I'll start debugging stuff once I'm back at home. Will you be free? I'll be back in around 1 hour or less.
yes I am around
Woops it took longer than I though, my apologies!
This is being REALLY weird to me. doom-one doesn't take longer than 10ms to load to me. Is this slow loading time happening only with doom-one?
Also, can you please send the first 15 lines of nvim -V3
output? Colorscheme should be one of the first things to be loaded.
@NTBBloodbath I got that wrong, it wasn't actually doom one, it's the doom-nvim/init.lua
that's taking >7000ms. Doom-one is actually fine for @tzurita.
I don't think so lol, at least not accordingly to one of the startuptime logs sent by him :thinking:
22 │ 011.066 000.028 000.028: sourcing /usr/share/nvim/runtime/autoload/netrw_gitignore.vim
23 │ 7146.854 001.835 001.835: sourcing /home/zuritat/.config/nvim/colors/doom-one.lua
24 │ 7147.325 7140.028 7138.166: sourcing /home/zuritat/.config/nvim/init.lua
Here his colors/doom-one.lua
file takes ages to load and init loads after colorscheme file and yeah that's very odd.
Actually yeah, true. I assumed the accumulated time in the left column was buggy and to go off the internal/self time in the right column. I guess it could be either?
sourcing "/etc/xdg/nvim/sysinit.vim"
line 2: sourcing "/usr/share/nvim/archlinux.vim"
finished sourcing /usr/share/nvim/archlinux.vim
continuing in /etc/xdg/nvim/sysinit.vim
finished sourcing /etc/xdg/nvim/sysinit.vim
could not source "/home/zuritat/.config/nvim/init.vim"
could not source "/etc/xdg//nvim/init.vim"
sourcing "/usr/share/nvim/runtime/filetype.vim"
line 2380: sourcing "/usr/share/vim/vimfiles/ftdetect/lf.vim"
finished sourcing /usr/share/vim/vimfiles/ftdetect/lf.vim
continuing in /usr/share/nvim/runtime/filetype.vim
not found in runtime path: "ftdetect/*.lua"
finished sourcing /usr/share/nvim/runtime/filetype.vim
sourcing "/usr/share/nvim/runtime/ftplugin.vim"
finished sourcing /usr/share/nvim/runtime/ftplugin.vim
sourcing "/usr/share/nvim/runtime/indent.vim"
finished sourcing /usr/share/nvim/runtime/indent.vim
sourcing "/usr/share/nvim/runtime/syntax/syntax.vim"
line 19: sourcing "/usr/share/nvim/runtime/syntax/synload.vim"
finished sourcing /usr/share/nvim/runtime/syntax/synload.vim
continuing in /usr/share/nvim/runtime/syntax/syntax.vim
finished sourcing /usr/share/nvim/runtime/syntax/syntax.vim
sourcing "/usr/share/nvim/runtime/plugin/gzip.vim"
finished sourcing /usr/share/nvim/runtime/plugin/gzip.vim
sourcing "/usr/share/nvim/runtime/plugin/health.vim"
finished sourcing /usr/share/nvim/runtime/plugin/health.vim
sourcing "/usr/share/nvim/runtime/plugin/man.vim"
finished sourcing /usr/share/nvim/runtime/plugin/man.vim
sourcing "/usr/share/nvim/runtime/plugin/matchit.vim"
not found in 'packpath': "pack/*/start/matchit"
line 3: sourcing "/usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim"
finished sourcing /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim
continuing in /usr/share/nvim/runtime/plugin/matchit.vim
finished sourcing /usr/share/nvim/runtime/plugin/matchit.vim
sourcing "/usr/share/nvim/runtime/plugin/matchparen.vim"
finished sourcing /usr/share/nvim/runtime/plugin/matchparen.vim
sourcing "/usr/share/nvim/runtime/plugin/netrwPlugin.vim"
finished sourcing /usr/share/nvim/runtime/plugin/netrwPlugin.vim
sourcing "/usr/share/nvim/runtime/plugin/rplugin.vim"
finished sourcing /usr/share/nvim/runtime/plugin/rplugin.vim
sourcing "/usr/share/nvim/runtime/plugin/shada.vim"
finished sourcing /usr/share/nvim/runtime/plugin/shada.vim
sourcing "/usr/share/nvim/runtime/plugin/spellfile.vim"
finished sourcing /usr/share/nvim/runtime/plugin/spellfile.vim
sourcing "/usr/share/nvim/runtime/plugin/tarPlugin.vim"
finished sourcing /usr/share/nvim/runtime/plugin/tarPlugin.vim
sourcing "/usr/share/nvim/runtime/plugin/tohtml.vim"
finished sourcing /usr/share/nvim/runtime/plugin/tohtml.vim
sourcing "/usr/share/nvim/runtime/plugin/tutor.vim"
finished sourcing /usr/share/nvim/runtime/plugin/tutor.vim
sourcing "/usr/share/nvim/runtime/plugin/zipPlugin.vim"
finished sourcing /usr/share/nvim/runtime/plugin/zipPlugin.vim
sourcing "/usr/share/vim/vimfiles/plugin/fzf.vim"
finished sourcing /usr/share/vim/vimfiles/plugin/fzf.vim
sourcing "/usr/share/vim/vimfiles/plugin/redact_pass.vim"
finished sourcing /usr/share/vim/vimfiles/plugin/redact_pass.vim
not found in 'packpath': "plugin/**/*.lua"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "start/*"
not found in runtime path: "plugin/**/*.vim"
not found in runtime path: "plugin/**/*.lua"
Reading ShaDa file "/home/zuritat/.local/share/nvim/shada/main.shada" info marks oldfiles FAILED
If it hangs and I hit cntrl-c it works immediately. Just don't know what is causing it. At any rate, I do see that it is also inconsistent across all 3 systems.
Closing due to inactivity. Should be resolved with the https://github.com/NTBBloodbath/doom-nvim/tree/next rewrite.
I cleaned out and re-installed. This is not everytime but the marority of the time it is super slow to startup.
I believe this may be the slowest.
SCRIPT /home/zuritat/.config/nvim/init.lua Sourced 1 time Total time: 7.784737 Self time: 0.002632