Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information