summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/human_readable.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py
index a3aed1bb..9667421a 100644
--- a/ranger/ext/human_readable.py
+++ b/ranger/ext/human_readable.py
@@ -12,6 +12,10 @@ def human_readable(byte, separator=' '):
 	>>> human_readable(2 ** 20 * 1023)
 	'1023 M'
 	"""
+
+	# I know this can be written much shorter, but this long version
+	# performs much better than what I had before.  If you attempt to
+	# shorten this code, take performance into consideration.
 	if byte <= 0:
 		return '0'
 	if byte < 2**10:
f='#n75'>75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95