Image generated with dstein64/neuralart. Updated hourly.
dstein64 / vim-startuptime Goto Github PK
View Code? Open in Web Editor NEWA plugin for profiling Vim and Neovim startup time.
License: MIT License
A plugin for profiling Vim and Neovim startup time.
License: MIT License
Image generated with dstein64/neuralart. Updated hourly.
I am using neovim on NixOS. When I execute :Startuptime
the top of the buffer shows that python3.vim has been loaded:
startup: 800.9
event time percent plot
packer_compiled.lua 333.30 41.62 ██████████████████████████
python3.vim 241.31 30.13 ██████████████████▉
filetype.vim 21.35 2.67 █▋
opening buffers 20.72 2.59 █▋
...
The details for this file are (the prefix is due to NixOS, that is just the provider file in the neovim package):
event: sourcing /nix/store/qyawd05zszdvcrgbvdhr2q4ay6ac4v9r-neovim-unwrapped-0.6.0/share/nvim/runtime/autoload/provider/python3.vim
start: 526.474
self: 240.351
self+sourced: 241.306
finish: 767.780
But I was sceptical if I use anything with python3 so I checked with filter python scriptnames
and that returns nothing. Here is also a startup.log generated with nvim --startuptime startup.log +q
for reference. It does not contain the string python
anywhere.
Why does :StartupTime
show this python3.vim file but --startuptime
and :scriptnames
don't?
The :StartupTime
command just opens a vsplit with
# vim-startuptime
Running: [0%]
And then nothing happens.
My neovim version is 0.6.1. This could be a configuration issue from my side, as I'm lazy loading this plugin on command execution. But there isn't any log or error. So I'm not sure how to proceed to debug this.
StartupTime --self --tries 10
produces:
|| Error detected while processing function
|| startuptime#StartupTime[8]
|| 264_Options[22]
|| E605: Exception not caught: vim-startuptime: unknown argument (--self)
Looking at the code, --self
isn't implemented in the options parser.
https://github.com/dstein64/vim-startuptime/blob/master/autoload/startuptime.vim#L541-L555
Hello,
this plugin worked for me previously, but now it doesn't anymore (latest git version).
In neovim it works fine, however in vim / gvim I just end up with this in a vsplit:
# vim-startuptime
Running: [100%]
Any ideas what might be wrong?
I'm on vim/gvim 8.2.3995 on debian testing/unstable.
Greetings,
jgb
While it's great to see the percent breakdown of each event, it would also be useful to display the (average, for multiple tries) total startup time at the top of the startuptime
buffer.
If we set the variable g:startuptime_tries
to other values than 1, when I run command :StartupTime
, I saw the following error almost all the time:
Error detected while processing function 15[1]..118_Profile[2]..startuptime#Main[9]..118_Consolidate:
line 9:
E605: Exception not caught: vim-startuptime: inconsistent tries
Sometimes, this command does succeed, but rarely.
NVIM v0.5.0-dev+1459-g384f9870f
The :StartupTime command just opens a horizontal split with
# vim-startuptime Running: [0%]
nothing happens afterwards, it remains on 0%
First few lines from :version
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]
Can't figure out how to debug this, any help would be appreciated, thanks!
I have an alias with neovim as nvim --startuptime /tmp/nvim-startuptime
because I have something to read startuptime onto my dashboard. This breaks vim-startuptime.
This isn't working for me on vim 9.0 or nvim 0.7.2 on Linux.
Could you please add set filetype=startuptime
or similar for the startuptime buffer? This would be useful e.g. for making a ftplugin
to set up additional mappings for the startuptime results buffer (such as mapping q
to quit the buffer, etc.)
When I launch vim on certain files, it takes like 5 seconds for it to actually open and render everything and be responsive, however, when I use this startup plugin, it shows me results such as 427.2, which is .4 seconds...
(It's my linter btw)
if I use the built-in nvim --startuptime
, it shows me more inclusive results
Is there a way to be even more inclusive in its profiling? (or maybe not timeout or something?)
I tend to look more for total time, and as of now I it is show in the message area at the bottom of the screen instead of being shown with the report. It would be nice to have a configuration option to show the sum on top row before any other time, something like this:
event time percent plot
------ ----- ------- ----
total 250.00 100.00
.vimrc 41.55 21.01 ██████████████████████████
nvim 0.6 debian 11
reproduce
nvim -u test_vimrc
:StartupTime
:StartupTime
:StartupTime
work fine.
touch s
nvim -u test_vimrc
:StartupTime
:StartupTime
nvim block, need kill nvim
test_vimrc
let g:config_dir = '/tmp/vimtest'
let g:cache_dir = '/tmp/vimtest/.cache'
let s:plug_install_dir = g:config_dir . '/plugged'
let s:plug_manager_file = s:plug_install_dir . '/vim-plug/plug.vim'
let s:plug_manager_download =
\ 'silent !git clone --depth 1 https://github.com/junegunn/vim-plug '
\ . s:plug_install_dir . '/vim-plug'
if filereadable(expand(s:plug_manager_file)) == 0
exec s:plug_manager_download
endif
exec 'source '. s:plug_install_dir . '/vim-plug/plug.vim'
call plug#begin(expand(s:plug_install_dir))
Plug 'dstein64/vim-startuptime'
call plug#end()
delc PlugUpgrade
filetype plugin indent on
syntax enable
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugUpdate --sync
\| endif
Hi, love this plugin! Just wanted to see if there was an API available for extracting the total startup time returned from the Profile UI. I want to just display this value when Neovim starts.
I have a preexisting file vim.log
that I obtained with vim --startuptime vim.log xxxxx.txt
I would like to :StartupTime vim.log
to get the visualization of that file.
Rationale: My vim sometimes is very slow to startup. Sometimes not always, and I have been able to reproduce with vim --startuptime vim.log xxx.txt
but not with :StartupTime
alone. Hence I would like to be able to open the vim.log
file that I generated and analyze it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.