From 1bc4fcb8ca70611b7d6d35dcae690d9ee62cd2f2 Mon Sep 17 00:00:00 2001 From: wmorgan Date: Thu, 1 Feb 2007 21:27:21 +0000 Subject: [PATCH] progressively update display based on time rather than number of entries git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@292 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- lib/sup/modes/thread-index-mode.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 8df0408..3eb96c7 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -320,11 +320,13 @@ class ThreadIndexMode < LineCursorMode def load_n_threads n=LOAD_MORE_THREAD_NUM, opts={} @mbid = BufferManager.say "Searching for threads..." orig_size = @ts.size + last_update = Time.now @ts.load_n_threads(@ts.size + n, opts) do |i| BufferManager.say "Loaded #{i} threads...", @mbid - if i % 5 == 0 + if (Time.now - last_update) >= 0.25 update BufferManager.draw_screen + last_update = Time.now end end @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } } -- 2.45.2