summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-23 19:53:42 +0100
committerhut <hut@lavabit.com>2009-12-23 19:53:42 +0100
commit793554498569c8f39e0ffcff4b475a948a4645c8 (patch)
treea5a35777655d7041a4b432446ac11136696d2615 /ranger
parent9a78b6449cb256fbe46e05f5a134a6e512893450 (diff)
downloadranger-793554498569c8f39e0ffcff4b475a948a4645c8.tar.gz
improved loader performance with win.nodelay()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/fsobject/loader.py6
-rw-r--r--ranger/gui/ui.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/ranger/fsobject/loader.py b/ranger/fsobject/loader.py
index ef91aae3..00992651 100644
--- a/ranger/fsobject/loader.py
+++ b/ranger/fsobject/loader.py
@@ -11,10 +11,10 @@ def status_generator():
 		yield '|'
 
 def delayfunc(n):
-	if n < 4:
+#	if n < 4:
 		return 0.05
-	else:
-		return 0.3
+#	else:
+#		return 0.15
 #		return math.log(n-2) * 0.2
 
 class Loader(object):
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index cdb58ad5..8134231e 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -67,16 +67,16 @@ class UI(DisplayableContainer):
 		curses.endwin()
 
 	def set_load_mode(self, boolean):
-		from ranger import log
 		boolean = bool(boolean)
 		if boolean != self.load_mode:
 			self.load_mode = boolean
 
 			if boolean:
-				log('setting halfdelay to 1')
-				curses.halfdelay(1)
+				# don't wait for key presses in the load mode
+				curses.cbreak()
+				self.win.nodelay(1)
 			else:
-				log('setting halfdelay to 20')
+				self.win.nodelay(0)
 				curses.halfdelay(20)
 
 	def destroy(self):