Commit d57f09ab authored by Chris Wilson's avatar Chris Wilson Committed by Chris Wilson

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
parent 428ba2d3
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
......
......@@ -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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment