Mercurial > code > home > repos > light9
diff bin/keyboardcomposer @ 356:c6aabf5bd3bc
big KC speedup from not reloading config.n3 constantly
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 11 Jun 2007 02:26:49 +0000 |
parents | a6662d61ebcd |
children | bd8a89743226 |
line wrap: on
line diff
--- a/bin/keyboardcomposer Wed Jun 13 06:01:22 2007 +0000 +++ b/bin/keyboardcomposer Mon Jun 11 02:26:49 2007 +0000 @@ -14,7 +14,7 @@ from light9.Fadable import Fadable from light9.Submaster import Submasters, sub_maxes from light9.subclient import SubClient -from light9 import dmxclient, showconfig, networking +from light9 import dmxclient, showconfig, networking, prof from light9.uihelpers import toplevelat, bindkeys from bcf2000 import BCF2000 @@ -111,10 +111,10 @@ try: self.sliders = Sliders(self.hw_slider_moved) except IOError: - class _: + class dummy: def valueOut(self, name, value): pass - self.sliders = _() + self.sliders = dummy() print "no hw sliders found" def make_key_hints(self): @@ -294,6 +294,10 @@ self.cb(int(name[6:]) - 1, value / 127) if __name__ == "__main__": + + #prof.watchPoint("/usr/lib/python2.4/site-packages/rdflib-2.3.3-py2.4-linux-i686.egg/rdflib/syntax/parsers/n3p/n3p.py", 67) + + parser = OptionParser() parser.add_option('--nonpersistent', action="store_true", help="don't load or save levels") @@ -327,9 +331,7 @@ reactor.addSystemEventTrigger('after', 'shutdown', kc.save) tksupport.install(root,ms=10) - if 0: - sys.path.append("/home/drewp/projects/cuisine/pour") - from utils import runstats - runstats("reactor.run()") - else: - reactor.run() + + + + prof.run(reactor.run, profile=False)