comparison bin/curvecalc @ 704:d5a9933a2222

don't reload curve files upon curve code reload Ignore-this: 597d66003a1e45daca5470fbd57974b7
author Drew Perttula <drewp@bigasterisk.com>
date Sun, 10 Jun 2012 07:34:41 +0000
parents 54a3dcba6597
children ed50631cf333
comparison
equal deleted inserted replaced
703:54a3dcba6597 704:d5a9933a2222
161 # mem problem somewhere; need to hold a ref to this 161 # mem problem somewhere; need to hold a ref to this
162 self.curvesetView = curveview.Curvesetview( 162 self.curvesetView = curveview.Curvesetview(
163 curvesVBox, zoomControlBox, self.curveset) 163 curvesVBox, zoomControlBox, self.curveset)
164 self.curvesetView._mtimes = mtimes 164 self.curvesetView._mtimes = mtimes
165 165
166 # curvesetview must already exist, since this
167 # makes 'add_curve' signals for all the initial
168 # curves
169 self.curveset.load(basename=os.path.join(
170 showconfig.curvesDir(),
171 showconfig.songFilenameFromURI(self.song)),
172 skipMusic=self.opts.skip_music)
173 # this is scheduled after some tk shuffling, to 166 # this is scheduled after some tk shuffling, to
174 # try to minimize the number of times we redraw 167 # try to minimize the number of times we redraw
175 # the curve at startup. If tk is very slow, it's 168 # the curve at startup. If tk is very slow, it's
176 # ok. You'll just get some wasted redraws. 169 # ok. You'll just get some wasted redraws.
177 self.curvesetView.goLive() 170 self.curvesetView.goLive()
223 graph = makeGraph() 216 graph = makeGraph()
224 217
225 curveset = Curveset(sliders=opts.sliders) 218 curveset = Curveset(sliders=opts.sliders)
226 subterms = [] 219 subterms = []
227 220
221 # curvesetview must already exist, since this
222 # makes 'add_curve' signals for all the initial
223 # curves.
224 curveset.load(basename=os.path.join(
225 showconfig.curvesDir(),
226 showconfig.songFilenameFromURI(song)),
227 skipMusic=opts.skip_music)
228
228 subtermPath = graphPathForSubterms(song) 229 subtermPath = graphPathForSubterms(song)
229 try: 230 try:
230 graph.parse(subtermPath, format='n3') 231 graph.parse(subtermPath, format='n3')
231 except urllib2.URLError, e: 232 except urllib2.URLError, e:
232 if e.reason.errno != 2: 233 if e.reason.errno != 2: