Changeset - 1e97f96ee00c
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 11 years ago 2014-06-14 23:08:09
drewp@bigasterisk.com
faster effect reload
Ignore-this: 9d6a733329596a7878fcc7ffbf2be2e
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/effecteval/effect.py
Show inline comments
 
@@ -3,6 +3,7 @@ import toposort
 
from rdflib import URIRef
 
from light9.namespaces import L9, RDF
 
from light9.curvecalc.curve import CurveResource
 
from light9 import prof
 
from light9 import Submaster
 
from light9 import Effects # gets reload() later
 
log = logging.getLogger('effect')
 
@@ -91,6 +92,7 @@ class EffectNode(object):
 
        # this is not expiring at the right time, when an effect goes away
 
        self.graph.addHandler(self.prepare)
 

	
 
    @prof.logTime
 
    def prepare(self):
 
        log.info("prepare effect %s", self.uri)
 
        # maybe there can be multiple lines of code as multiple
 
@@ -103,8 +105,8 @@ class EffectNode(object):
 

	
 
        self.sortCodes()
 

	
 
        reload(Effects)
 
        self.otherFuncs = Effects.configExprGlobals()
 
        #reload(Effects)
 
        self.otherFuncs = prof.logTime(Effects.configExprGlobals)()
 

	
 
    def sortCodes(self):
 
        """put self.codes in a working evaluation order"""
0 comments (0 inline, 0 general)