Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache location of session file #10

Merged
merged 1 commit into from
Jul 24, 2015
Merged

cache location of session file #10

merged 1 commit into from
Jul 24, 2015

Commits on Jul 24, 2015

  1. cache location of session file

    Function session_file() returns the name of session file.
    This function is called for every change in VIM layout.
    
    Caching of return variable of this function gives x100 performance
    improvement.
    
    Before change:
    FUNCTIONS SORTED ON TOTAL TIME
    count  total (s)   self (s)  function
        6   3.369383   0.015592  g:GitSessionUpdate()
        6   3.353791   0.000861  <SNR>35_session_file()
        6   3.268404   0.001057  <SNR>35_session_dir()
       12   3.263580   0.004735  <SNR>35_in_git_repo()
    
    After this change:
    FUNCTIONS SORTED ON TOTAL TIME
    count  total (s)   self (s)  function
       11   0.026195             g:GitSessionUpdate()
       23   0.025646             <SNR>38_Highlight_Matching_Pair()
       11   0.000956             nerdtree#checkForBrowse()
    
    VIM profiling (http://stackoverflow.com/a/12216578):
            :profile start profile.log
            :profile func *
            :profile file *
            " At this point do slow actions
            :profile pause
            :noautocmd qall!
    
    Signed-off-by: Leon Romanovsky <leon@leon.nu>
    rleon committed Jul 24, 2015
    Configuration menu
    Copy the full SHA
    80df22f View commit details
    Browse the repository at this point in the history