diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-17 20:14:46 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-05-17 20:14:46 +0000 |
commit | d57f09aba74aec47f3d538acb9e829201bdfe173 (patch) | |
tree | 8a95b50727950802311b71799c701cd7a182c5eb /perf | |
parent | 428ba2d3611d5162208b6d9087d1ec8621b5ca82 (diff) |
Measure full screen scrolling performance.
2007-05-17 Chris Wilson <chris@chris-wilson.co.uk>
* perf/scroll.vim:
* perf/vim.sh:
Measure full screen scrolling performance.
svn path=/trunk/; revision=1891
Diffstat (limited to 'perf')
-rw-r--r-- | perf/scroll.vim | 27 | ||||
-rwxr-xr-x | perf/vim.sh | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/perf/scroll.vim b/perf/scroll.vim index 1bb2afd..dcbbc75 100644 --- a/perf/scroll.vim +++ b/perf/scroll.vim @@ -26,6 +26,23 @@ function Scroll(dir, windiv) endwhile endfunction +function WindowScroll(dir, windiv) + let wh = winheight(0) + let i = 1 + while i < wh * a:windiv + let i = i + 1 + if a:dir == "d" + normal j + else + normal k + end + " insert a character to force vim to update! + normal I + redraw + normal dl + endwhile +endfunction + function AutoScroll(count) let loop = 0 while loop < a:count @@ -39,3 +56,13 @@ function AutoScroll(count) endwhile quit! endfunction + +function AutoWindowScroll(count) + let loop = 0 + while loop < a:count + let loop = loop + 1 + call WindowScroll("d", 10) + call WindowScroll("u", 10) + endwhile + quit! +endfunction diff --git a/perf/vim.sh b/perf/vim.sh index ef3f56d..1ad7bd9 100755 --- a/perf/vim.sh +++ b/perf/vim.sh @@ -5,3 +5,4 @@ # scrolling (just the cursor) time vim -u scroll.vim -c ':quit' UTF-8-demo.txt time vim -u scroll.vim -c ':call AutoScroll(1000)' UTF-8-demo.txt +time vim -u scroll.vim -c ':call AutoWindowScroll(20)' UTF-8-demo.txt |