Neovim for Beginners — Performance
One main reason we use Vim or Neovim is that we want a high-performance code editor. In this article, we are going to
- Measure the startup performance
- Configure the options and plugins to improve the startup performance
- Measure the performance of opening a large file
- Configure the options and plugins to improve the performance of opening a large file
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Let’s measure our current startup performance. To do this we can use the
startuptime option and write the output to a file.
The performance is measured using a machine running Arch Linux, with an Intel Core i3 processor, and 8GB RAM. Potentially the performance could be much better in your machine.
# nvb --startuptime <file>
nvb is the alias we defined for Neovim.
Looking at the log, we can see it takes 193 milliseconds to start up Neovim, even though we have already installed more than 80 plugins.
We can see the number of installed plugins from the welcome screen.
The reason it is still fast is that for most of the plugins we installed, we make sure they are lazy-loaded. To see the statuses of the plugins, type