-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
plugin: --startuptime statistics and visualization #6182
Comments
Can you link to the plugin? No objection to including it if someone does the work and it's small and well written. |
There's no plugin like that yet. There are some data plotters that create a graph based on the output of I was imagining something similar to |
Maybe @bchretien 's vim-profiler is one such candidate. It does already the profiling/statistics part:
|
@toogley That output is pretty close to what I had in mind. Unfortunately vim-profiler depends on Python. I think something as essential as this, shouldn't have any dependencies. The second problem with vim-profiler is that it depends on which plugin-manager you use. For example it doesn't work with dein.vim. It also doesn't work on Windows. |
I took a stab at this: https://github.com/tweekmonster/startuptime.vim It doesn't care about plugin managers and you can run it in Vim. |
Neat that it does multiple samples. Why not Windows? |
@tweekmonster looks great! |
@tweekmonster Awesome. That's perfect (if it were to run on Windows also). I bet that plugin will skyrocket in popularity. |
Didn't want to spend the time on it at 2AM. I also didn't know if there was something like |
Well, we can fix the 2-second delay in nvim core. I think we should ship the plugin with nvim. Though for that purpose I would suggest |
BTW newer versions of Vim have the |
nvim also has |
If this ships with nvim, I demand we keep the Mortal Kombat text. |
You can use v:progpath |
@chrisbra That's not absolute in Vim, so it may not run the correct binary. @brammool decide the cost of determining that once at startup was too great, so instead the user has to deal with the uncertainty if they All that would need to change is to use findYourself to determine the value for |
@jamessan I didn't remember that (and I think I rely on the exact path in some plugin already). Perhaps we should bring that issue up on vim_dev again? |
I was just trying this out and it's not even influenced by |
@tweekmonster need to to |
This comment was marked as resolved.
This comment was marked as resolved.
This doesn't help if the current process isn't in |
Tommy Allen wrote:
> need to to exepath(v:progpath), see :h v:progpath
This doesn't help if the current process isn't in `$PATH`.
Then it must be an absolute or relative path. This is a common problem
in Unix, argv[0] is the only thing the process gets, you have to figure
out the actual location yourself somehow.
…--
Don't believe everything you hear or anything you say.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Yes, but if it is relative, the best place to resolve this would be in the user's vimrc since another plugin could change cwd before my plugin can resolve it. On some systems, I could just resolve it from If performance is an issue, couldn't the path be resolved the first time |
Just saw this after posting: https://groups.google.com/d/msg/vim_dev/oRXcsh3NXgc/VlZf7RQ4AgAJ |
That only works if the required information to resolve the location of the binary is stored at startup.
That makes |
This comment was marked as outdated.
This comment was marked as outdated.
Could be interesting to have CI history and regression tests on neovim startuptime by itself and maybe with some popular plugin configs. To have a real-world integration "performance test". Besides that this :CheckStartup would be interesting. Is anyone working on making this into a PR? |
I think it would be really great if something like timecop could be added directly into Neovim. For many users, using Neovim is all about performance. With the
--startuptime
option already there, I think all that's missing is some kind of cli visualization and statistic. It would be great to have it show on:timecop
.I think just dumping a file and then leaving the user to "visualize it however you want" isn't a great user experience.
The text was updated successfully, but these errors were encountered: