{"action":"created","issue":{"url":"https://api.github.com/repos/bling/vim-airline/issues/721","labels_url":"https://api.github.com/repos/bling/vim-airline/issues/721/labels{/name}","comments_url":"https://api.github.com/repos/bling/vim-airline/issues/721/comments","events_url":"https://api.github.com/repos/bling/vim-airline/issues/721/events","html_url":"https://github.com/bling/vim-airline/issues/721","id":59257113,"number":721,"title":"Lazy loading stopped working after recent initialization clean/muck up","user":{"login":"vexplore","id":10591325,"avatar_url":"https://avatars.githubusercontent.com/u/10591325?v=3","gravatar_id":"","url":"https://api.github.com/users/vexplore","html_url":"https://github.com/vexplore","followers_url":"https://api.github.com/users/vexplore/followers","following_url":"https://api.github.com/users/vexplore/following{/other_user}","gists_url":"https://api.github.com/users/vexplore/gists{/gist_id}","starred_url":"https://api.github.com/users/vexplore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vexplore/subscriptions","organizations_url":"https://api.github.com/users/vexplore/orgs","repos_url":"https://api.github.com/users/vexplore/repos","events_url":"https://api.github.com/users/vexplore/events{/privacy}","received_events_url":"https://api.github.com/users/vexplore/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bling/vim-airline/labels/performance","name":"performance","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-27T16:15:49Z","updated_at":"2015-03-02T22:07:49Z","closed_at":null,"body":"Just updated the airline and my airline lazy loading setup (airline adds 20-100ms, so I only used airline (and related plugins) for coding) stopped working. \r\n\r\ngit bisect shows that \r\n\r\ncommit 59752b265907d9cbce98a8efea7a8690a47fcab7\r\nAuthor: Bailey Ling <bling@live.ca>\r\nDate:   Thu Feb 19 21:08:21 2015 -0500\r\n\r\n    clean up initialization code\r\n\r\nIs the first bad commit."},"comment":{"url":"https://api.github.com/repos/bling/vim-airline/issues/comments/76836975","html_url":"https://github.com/bling/vim-airline/issues/721#issuecomment-76836975","issue_url":"https://api.github.com/repos/bling/vim-airline/issues/721","id":76836975,"user":{"login":"vexplore","id":10591325,"avatar_url":"https://avatars.githubusercontent.com/u/10591325?v=3","gravatar_id":"","url":"https://api.github.com/users/vexplore","html_url":"https://github.com/vexplore","followers_url":"https://api.github.com/users/vexplore/followers","following_url":"https://api.github.com/users/vexplore/following{/other_user}","gists_url":"https://api.github.com/users/vexplore/gists{/gist_id}","starred_url":"https://api.github.com/users/vexplore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vexplore/subscriptions","organizations_url":"https://api.github.com/users/vexplore/orgs","repos_url":"https://api.github.com/users/vexplore/repos","events_url":"https://api.github.com/users/vexplore/events{/privacy}","received_events_url":"https://api.github.com/users/vexplore/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T22:07:49Z","updated_at":"2015-03-02T22:07:49Z","body":"Sorry, it's not really a perf regression but a feature/bug regression. I meant that lazy loading using a plugin manager (NeoBundle or vim-plug) (sort of see below) worked before, it stopped working after that commit (59752b2). i.e. if I add vim-airline to rtp and source airline.vim after vim has started, Airline* commands will be available but don't work correctly. AirlineToggle/AirlineRefresh shows all sorts of errors like this:\r\n\r\nError detected while processing function airline#update_statusline..<SNR>52_invoke_funcrefs..airline#util#exec_funcrefs..airline#extensions#default#apply..<SNR>64_build_sections..<SNR>64_add_section..<SNR>64_get_section:\r\nline    7:\r\nE121: Undefined variable: g:airline_section_a\r\nE116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})\r\nE15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})\r\nline    9:\r\nE121: Undefined variable: text\r\nE116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix\r\nE15: Invalid expression: empty(text) ? '' : prefix.text.suffix\r\n\r\nA probably related issue that I just noticed, which also exists in previous commits (including v0.7) is that lazy loading (set rtp and source after vim startup) doesn't work if vim starts with no argument or new files, i.e. AirlineToggle does nothing and AirlineRefresh shows above errors. Since I usually start vim with an existing file, I didn't notice the problem until now. The commit (59752b2) just makes things even worse: stopped working with vim <existing-file> altogether.\r\n\r\nThe comment in () about performance is about why I'm using lazy loading. The slowness is mostly due to using nfs as home directory on some hosts and that airline uses many small files instead of few files for autoload."}}