]> sigrok.org Git - libsigrokdecode.git/commitdiff
Use psyco (if available) to improve performance.
authorUwe Hermann <redacted>
Mon, 12 Apr 2010 17:42:35 +0000 (19:42 +0200)
committerUwe Hermann <redacted>
Mon, 12 Apr 2010 17:42:35 +0000 (19:42 +0200)
scripts/i2c.py
scripts/transitioncounter.py

index f7022f5c3fce29397e66ed8acf98442a2523f3c5..46c338175eb78c8fdd18d85cddbb3dac73df3686 100644 (file)
@@ -162,3 +162,10 @@ def sigrokdecode_register_i2c():
        }
        return metadata
 
+# Use psyco (if available) as it results in huge performance improvements.
+try:
+       import psyco
+       psyco.bind(sigrokdecode_i2c)
+except ImportError:
+       pass
+
index cbf80680704aedfc0d53be61e363b30839047270..df7e27e5748cc2f954aaeb442e6f9e1319de9616 100644 (file)
@@ -70,3 +70,10 @@ def sigrokdecode_count_transitions(inbuf):
 
        return outbuf
 
+# Use psyco (if available) as it results in huge performance improvements.
+try:
+       import psyco
+       psyco.bind(sigrokdecode_count_transitions)
+except ImportError:
+       pass
+