From 571f892fcdc28693ec91c090e518f18be7fca138 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 1 Sep 2017 12:01:43 +0200 Subject: [PATCH] README: mention how to fix performance problems --- README.md | 7 ++++++- doc/airline.txt | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 175d4031..434dbe97 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,11 @@ Many optimizations have been made such that the majority of users will not see a The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. -If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions. +If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions (e.g. `:let g:airline_extensions = []`). + +Also, you can enable caching of the various syntax highlighting groups. This will try to prevent some of the more expensive `:hi` calls in Vim, which seem to be expensive in the Vim core at the expense of possibly not being hunderet percent correct all the times (especially if you often change highlighting groups yourself using `:hi` commands). To set this up do `:let g:airline_highlighting_cache = 1`. A `:AirlineRefresh` will however clear the cache. + +In addition you might want to check out the [dark_minimal theme][55], which does not change highlighting groups once they are defined. Also please check the [FAQ][27] for more information on how to diagnose and fix the problem. # Screenshots @@ -259,3 +263,4 @@ MIT License. Copyright (c) 2013-2017 Bailey Ling & Contributors. [52]: https://github.com/Shougo/dein.vim [53]: https://github.com/lervag/vimtex [54]: https://github.com/k-takata/minpac/ +[55]: https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/dark_minimal.vim diff --git a/doc/airline.txt b/doc/airline.txt index 25b9b632..b9debed7 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -1254,6 +1254,9 @@ A. Themes have been extracted into the vim-airlines-themes repository. Simply clone https://github.com/vim-airline/vim-airline-themes and everything should work again. +Q. Performance is bad +A. Check the question at the wiki: + https://github.com/vim-airline/vim-airline/wiki/FAQ#i-have-a-performance-problem Solutions to other common problems can be found in the Wiki: