aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2015-09-14 05:01:12 -0400
committerTeddy Wing2015-09-14 05:01:12 -0400
commit07a75d523eadaf1027aa8bf287256602ad05f97f (patch)
treeec628562b42b1c89ecc3b834acb308e30383b061 /autoload
parent8e206e6d4ad49d70e4adc2b79feea4bbc426a3f2 (diff)
downloadvim-grappele-07a75d523eadaf1027aa8bf287256602ad05f97f.tar.bz2
plugin/grappele.vim: Fix performance issue with `G`
Looked into the performance issues I was having with the `G` command. After a little profiling and then messing around with let start = reltime() | <do stuff> | echom reltimestr(reltime(start)) Using the `reltime` method I discovered that `grappele#Grappele()` was running pretty quick (~60 time units). I then ran it around the :<c-u>call grappele#Grappele(v:count)<cr> part of the mapping and found that it took about 130 time units. Then doing nnoremap G :let start = reltime() \| execute 'normal! G' | echom reltimestr(reltime(start)) was pretty quick. With that information, I decided to try a direct mapping bypassing the `<Plug>` mapping just to see what that would do. Turns out the custom `G` command works much faster with this method for some reason. In terms of feel it's as fast as the normal `G` command. Replacing the `<Plug>` mapping with the direct one for speed. Not really sure what the reason for this is but I'm glad the performance is up to snuff and actually usable now. I'm testing this on OS X 10.8.5 with the stock Vim (7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)). Also noticed this issue on my Debian server which I just found out uses the same version of Vim (7.3 (2010 Aug 15, compiled May 4 2012 04:25:35)).
Diffstat (limited to 'autoload')
0 files changed, 0 insertions, 0 deletions