Measure full screen scrolling performance.
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 May 2007 20:14:46 +0000 (20:14 +0000)
committerChris Wilson <cpwilson@src.gnome.org>
Thu, 17 May 2007 20:14:46 +0000 (20:14 +0000)
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

ChangeLog
perf/scroll.vim
perf/vim.sh

index 37bc0aa..f32200f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-17  Chris Wilson  <chris@chris-wilson.co.uk>
+
+       * perf/scroll.vim:
+       * perf/vim.sh:
+           Measure full screen scrolling performance.
+
 2007-05-15  Chris Wilson  <chris@chris-wilson.co.uk>
 
        kmaraas reported an issue on IRC where the scrollback was not being
index 1bb2afd..dcbbc75 100644 (file)
@@ -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 \e
+               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
index ef3f56d..1ad7bd9 100755 (executable)
@@ -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