Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system() call slow down startup #121

Closed
sljeff opened this issue Jan 4, 2022 · 2 comments
Closed

system() call slow down startup #121

sljeff opened this issue Jan 4, 2022 · 2 comments

Comments

@sljeff
Copy link

sljeff commented Jan 4, 2022

Original code and start-up time analysis

            let s:osname = tolower(s:StripWhitespace(s:Chomp(system('uname -s'))))
            if s:osname =~ '^cygwin' || s:osname =~ '^mingw' || s:osname =~ '^msys'
                let s:osname = 'windows'
            endif
            let s:architecture = s:StripWhitespace(s:Chomp(system('uname -m')))
=====================================
Top 10 plugins slowing nvim's startup
=====================================
1	2698.521   vim-wakatime
2	 33.975   vim-colorschemes
3	  5.177   nvim-treesitter
4	  2.576   nvim-cmp
5	  2.551   indent-blankline.nvim
6	  1.610   vim-fugitive
7	  1.606   vimspector
8	  1.080   fzf
9	  0.880   cmp-buffer
10	  0.576   vim-anyfold
=====================================

Modified code and start-up time analysis

            let s:osname = tolower(s:StripWhitespace(s:Chomp('Darwin')))
            if s:osname =~ '^cygwin' || s:osname =~ '^mingw' || s:osname =~ '^msys'
                let s:osname = 'windows'
            endif
            let s:architecture = s:StripWhitespace(s:Chomp('x86_64'))
=====================================
Top 10 plugins slowing nvim's startup
=====================================
1	 30.955   vim-colorschemes
2	  4.523   nvim-treesitter
3	  3.992   vim-wakatime
4	  2.972   indent-blankline.nvim
5	  2.649   nvim-cmp
6	  1.632   vimspector
7	  1.261   vim-fugitive
8	  1.147   cmp-buffer
9	  0.976   fzf
10	  0.529   vim-anyfold
=====================================

My enviroment

in ~ via 🐹 v1.17.5 via 🐍 3.8.2
at 14:28:02 ➜  neofetch --off
[email protected]
---------------------------
OS: macOS 12.1 21C52 x86_64
Host: MacBookPro11,4
Kernel: 21.2.0
Uptime: 20 days, 2 hours
Packages: 249 (brew)
Shell: fish 3.3.1
Resolution: 1200x1920, 1440x900
DE: Aqua
WM: Quartz Compositor
WM Theme: Blue (Light)
Terminal: iTerm2
Terminal Font: BlexMonoNerdFontComplete- 17
CPU: Intel i7-4770HQ (8) @ 2.20GHz
GPU: Intel Iris Pro
Memory: 10930MiB / 16384MiB

in ~ via 🐹 v1.17.5 via 🐍 3.8.2
at 14:28:20 ➜  nvim --version
NVIM v0.6.0
Build type: Release
LuaJIT 2.1.0-beta3
编译者 brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"
@sljeff sljeff changed the title system() call will slow down startup system() slow down startup Jan 4, 2022
@sljeff sljeff changed the title system() slow down startup system() call slow down startup Jan 4, 2022
@alanhamlett
Copy link
Member

Fixed in latest master version. Can you see if it's faster for you now?

@sljeff
Copy link
Author

sljeff commented Jan 5, 2022

Fixed in latest master version. Can you see if it's faster for you now?

Thanks, it's a lot faster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants