diff bin/lightsim @ 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 941cfe1e1691
children 60b49f6c2027
line wrap: on
line diff
--- a/bin/lightsim	Wed Jun 13 06:01:22 2007 +0000
+++ b/bin/lightsim	Mon Jun 11 02:26:49 2007 +0000
@@ -12,7 +12,7 @@
 logging.basicConfig(format="%(asctime)s %(levelname)-5s %(name)s %(filename)s:%(lineno)d: %(message)s")
 log.setLevel(logging.DEBUG)
 import Tkinter as tk
-from light9 import networking, Patch, showconfig, dmxclient, updatefreq
+from light9 import networking, Patch, showconfig, dmxclient, updatefreq, prof
 from light9.namespaces import L9
 from louie import dispatcher
 
@@ -96,11 +96,4 @@
 top.protocol('WM_DELETE_WINDOW', reactor.stop)
 tksupport.install(ogl, ms=20)
 
-if 0:
-    import hotshot, hotshot.stats
-    p = hotshot.Profile("/tmp/pro")
-    p.runcall(reactor.run)
-    p.close()
-    hotshot.stats.load("/tmp/pro").sort_stats('time').print_stats()
-else:
-    reactor.run()
+prof.run(reactor.run, profile=False)