Mercurial > code > home > repos > light9
changeset 1158:da006651b531
more timing logs in EE
Ignore-this: 8a620ecae69dacf7e1c113371444462f
author | drewp@bigasterisk.com |
---|---|
date | Sat, 14 Jun 2014 23:42:33 +0000 |
parents | dc86936969d8 |
children | b7dd4685abfb |
files | light9/effecteval/effect.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/effecteval/effect.py Sat Jun 14 23:41:47 2014 +0000 +++ b/light9/effecteval/effect.py Sat Jun 14 23:42:33 2014 +0000 @@ -22,6 +22,7 @@ self.pyResources = self._resourcesAsPython(self.resources) self.possibleVars = self.findVars(self.inExpr) + @prof.logTime def _asPython(self): """ out = sub(<uri1>, intensity=<curveuri2>) @@ -60,19 +61,21 @@ # this result could vary with graph changes (rare) return self.graph.contains((uri, RDF.type, L9['Curve'])) + @prof.logTime def _resourcesAsPython(self, resources): """ mapping of the local names for uris in the code to high-level objects (Submaster, Curve) """ out = {} - subs = Submaster.get_global_submasters(self.graph) + subs = prof.logTime(Submaster.get_global_submasters)(self.graph) for localVar, uri in resources.items(): for rdfClass in self.graph.objects(uri, RDF.type): if rdfClass == L9['Curve']: cr = CurveResource(self.graph, uri) - cr.loadCurve() + # this is slow- pool these curves somewhere, maybe just with curveset + prof.logTime(cr.loadCurve)() out[localVar] = cr.curve break elif rdfClass == L9['Submaster']: