summaryrefslogtreecommitdiff
path: root/scripts/transitioncounter.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-04-12 19:42:35 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2010-04-12 19:42:35 +0200
commit887d6cfa6a924254a9a96a3cc704e6189a53b944 (patch)
treed65b3d26ee81eb91be1bccb9cb077521c15ecd43 /scripts/transitioncounter.py
parent0588ed702725edbb5ed37ceb63fced93a5e68251 (diff)
downloadlibsigrokdecode-887d6cfa6a924254a9a96a3cc704e6189a53b944.tar.gz
libsigrokdecode-887d6cfa6a924254a9a96a3cc704e6189a53b944.zip
Use psyco (if available) to improve performance.
Diffstat (limited to 'scripts/transitioncounter.py')
-rw-r--r--scripts/transitioncounter.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/transitioncounter.py b/scripts/transitioncounter.py
index cbf8068..df7e27e 100644
--- a/scripts/transitioncounter.py
+++ b/scripts/transitioncounter.py
@@ -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
+