You'll have to do some more memoization to make the performance reasonable; recomputing and redrawing everything on each change isn't very scalable. I'm working on a programming model for this:
However, when you change something inside the loop, its likely that everything will have to be re-executed. The only way around this is to break up the loop somehow. Or perhaps see Umut's work on self-adjusting computation:
http://research.microsoft.com/apps/pubs/default.aspx?id=2013...
However, when you change something inside the loop, its likely that everything will have to be re-executed. The only way around this is to break up the loop somehow. Or perhaps see Umut's work on self-adjusting computation:
http://www.umut-acar.org/self-adjusting-computation
Its an interesting research area.