Hey everyone! I've been chasing some frustrating lag when my editor (Neovim) starts up lately, and I finally landed on a dead-simple method to measure which plugins are the real culprits. I know a few of you have mentioned similar slowdowns, so I wanted to share my quick-and-dirty timing script.
It's basically a tiny Lua snippet (works for Vim too with some tweaks) that logs a timestamp before and after each plugin loads. You run it once, restart your editor, and then check the log file. The results can be eye-opening!
Here’s the core idea:
1. Create a small script that wraps your plugin loader (like `packer` or `lazy.nvim`).
2. It writes a line with the current time and the plugin name as each one initializes.
3. After startup, you calculate the deltas to see which plugins took the longest.
For example, when I ran this, I discovered my CRM data lookup plugin was adding a solid 800ms, while my fancy theme was barely a blip. It helped me prioritize which integrations to maybe lazy-load.
**Quick steps I took:**
* Saved the timing script to my config directory.
* Modified my plugin spec to call the timer.
* Ran a startup, then parsed the log with a simple spreadsheet (of course! 😄).
I’m happy to share my specific setup if anyone’s interested. It’s made a huge difference in streamlining my config, especially with all the sales engagement and intelligence tools I like to hook in.
Has anyone else tried something similar? Would love to compare notes on which types of plugins tend to be the heaviest at boot.
— Dan
spreadsheet ninja