Comments (9)
I did a few tests using the --startuptime
measurement and what I came up with is that syntastic takes approximately 3/4 of my startup time initializing scripts. I don't have a small system either, there are 61 individual plugins I have tracked.
The columns here are time spent on script + vim's time, vim's time, and the action/script. It is sorted by the first column with most time at the bottom. This first one is when I had syntastic enabled on load.
004.627 004.627: vim-delimitMate/plugin/delimitMate.vim
004.859 004.859: vim-unimpaired/plugin/unimpaired.vim
004.935 004.262: vim-easymotion/plugin/EasyMotion.vim
005.990: shell ini
007.334 007.334: vim-fugitive/plugin/fugitive.vim
009.751: expanding
011.539 011.539: vim-nerd-commenter/plugin/NERD_commenter.vim
012.289 012.289: vim-textobj-rubyblock/plugin/textobj/rubyblock.vim
013.193: loading p
017.100 015.738: plasticcodewrap.vim
017.268 016.279: vim-textobj-entire/plugin/textobj/entire.vim
017.497 017.497: vim-notmuch-ruby/plugin/notmuch-ruby.vim
029.354 025.850: vim/runtime/filetype.vim
031.949 030.893: vim-nerdtree/plugin/NERD_tree.vim
056.747 056.747: vim-ultisnips/plugin/UltiSnips.vim
090.315 039.835: $HOME/.vimrc
519.696 519.696: vim-syntastic/plugin/syntastic.vim
For comparison this is without syntastic.
003.395 002.826: sourcing vim-easymotion/plugin/EasyMotion.vim
003.544: reading viminfo
003.835 003.835: sourcing vim-delimitMate/plugin/delimitMate.vim
004.270: shell init
004.376 004.376: sourcing vim-unimpaired/plugin/unimpaired.vim
004.391: VimEnter autocomma
005.267 005.267: sourcing vim-fugitive/plugin/fugitive.vim
008.692: expanding argument
010.390 010.390: sourcing vim-nerd-commenter/plugin/NERD_commenter.vim
011.194: loading plugins
011.388 011.388: sourcing vim-textobj-rubyblock/plugin/textobj/rubyblock.vim
012.061 011.412: sourcing vim-textobj-entire/plugin/textobj/entire.vim
015.753 014.708: sourcing plasticcodewrap.vim
018.859 018.859: sourcing vim-notmuch-ruby/plugin/notmuch-ruby.vim
023.121 020.586: sourcing runtime/filetype.vim
023.339 022.192: sourcing vim-nerdtree/plugin/NERD_tree.vim
050.434 050.434: sourcing vim-ultisnips/plugin/UltiSnips.vim
076.611 033.631: sourcing $HOME/.vimrc
Something that might be of help is I recently had a similar situation with my vimrc. It was taking about the same amount of time as syntatstic. What I found to be the problem was 2 lines. I had a check for an executable()
and a system call to that executable for some basic configuration information. Because the time is spent mostly in vim, I suspect syntastic might have a similar issue.
For reference, I am also on a Mac (10.7.3) using MacVim Snapshot 64 compiled through homebrew against ruby 1.9.3-p125 and the system python and Xcode 4.3.2 and I used vim from the console on zsh on a custom iTerm2 build in tmux.
To repeat the tests you can do the following:
vim --startuptime vim.log -c q
vim -c 'r ! cat vim.log| sort -k 2'
from syntastic.
That's pretty strange. The most likely thing is that it is running a syntax checker over the file you start vim with and it is taking ages to return.
Is it happening with all filetypes or just some specific types?
For a temporary fix you could use this:
let g:pathogen_disabled = ['syntastic']
function! ActivateSyntastic() abort
set rtp+=~/.vim/bundle/syntastic
runtime plugin/syntastic.vim
endfunction
This tells pathogen not to load it at startup, and provides a function to do so on request. You can call it via ":call ActivateSyntastic()" or make a mapping or command to do so.
from syntastic.
I've also noticed this.
Following this tutorial: http://usevim.com/2012/04/18/startuptime/ seems to prove that syntastic is the problem here, unfortunately (I'm also on OSX).
from syntastic.
It looks like the startup delay was due to a system call like I thought. I delayed the system call until the first SyntasticMake
is called on cehoffman@98b7e0e01b496d975bb12606674d5b6d6f10a4de.
The time for syntastic to start now takes just 000.866
msec.
from syntastic.
@cehoffman sorry to be dumb, does that mean that syntastic has the problem, or is to do with vim on mac specifically?
from syntastic.
@johnhamelink well there is most likely something at play for the exceedingly long startup times for mattmartini. However there is a very real comparatively expensive startup call syntastic makes that other plugins do not. It was/is a simple fix with no adverse effects. From my initial search at the main file that is loaded on startup I don't see anything else that seems like a likely candidate to cause problems for anyone.
Also, as you can see from my test results on at least one Mac syntastic is loading very quickly (with the small change) and was only at half a second without the change.
from syntastic.
I tried the patch and my vim startup times are now about the same with or without syntastic ( < 0.2sec)
On May 8, 2012, at 11:20 AM, Chris Hoffman wrote:
@johnhamelink well there is most likely something at play for the exceedingly long startup times for mattmartini. However there is a very real comparatively expensive startup call syntastic makes that other plugins do not. It was/is a simple fix with no adverse effects. From my initial search at the main file that is loaded on startup I don't see anything else that seems like a likely candidate to cause problems for anyone.
Also, as you can see from my test results on at least one Mac syntastic is loading very quickly (with the small change) and was only at half a second without the change.
Reply to this email directly or view it on GitHub:
#91 (comment)
from syntastic.
+1. Please merge this, it really makes a difference.
from syntastic.
Hey guys,
I have merged @cehoffman's fix in. Can you confirm that it fixes the start up time?
from syntastic.
Related Issues (20)
- Location list flashes then disappears HOT 1
- Checkers problem HOT 2
- Assembly files of different architecture(s): how? HOT 1
- How highlight full word (not line) warning or error in code? HOT 2
- Multiple error windows opened for the same project. HOT 2
- Syntastic Not finding checker [merlin] HOT 2
- syntastic checker output: python: can''t open file HOT 2
- Garbled characters appear in the sidebar HOT 3
- plase patch please
- loc_list should be closed when 'WinLeave' is detected. HOT 4
- How can I disable Syntastic active mode if opened read-only (via "view" command) HOT 2
- Bad configuration
- Pylint comments are not disabling errors HOT 1
- Only one character is underlined, not the whole error HOT 1
- Squiggles start at the wrong place when there are tab characters before them HOT 1
- Integrate with GH workflow linter HOT 1
- Find shared/library headers HOT 1
- strange behavior of loc_list related to `g:syntastic_cpp_checkers` HOT 1
- Add new checker script for Ruff HOT 2
- syntastic: error: checker ansible/ansible_lint: can't parse version string (abnormal termination?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syntastic.