Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Graph Drawing & /View Performance

From: chris:langreiter at: 6-May-2002 20:22

I've spent most of today with porting the algorithm behind the fantastic TouchGraph applet ( to REBOL/View. Originally I intended only to output the node coordinates after, say, 1000 iterations to handle final display to Flash or whatever. Just to make sure everything was okay I visualized the result with REBOL/View, and - shock! - was just amazed at how fast it was (I've also ported the algorithm to Flash/ActionScript - it's pretty much impossible to increase the number of nodes to over 15 or even 20 - REBOL/View seems to be a whole lot faster). But then, when I tried to figure out a way to implement edge drawing, all my /Viewnduced happiness came tumbling down. I can't seem to figure out a way to _quickly_ (REALLY quickly) draw lines in /View. My first naive attempts involved the effect facet and the Draw Dialect, but performance was just - horrendous. The best thing I can come up with is creating and setting images as often as needed, but there _must_ be a better (i.e. faster) way ... Some way that allows me to directly act upon an existing image. f/image/clear f/image/line 200x200 150x300 Comment the line "f/image: to-image edge-layout" to see how fast node layouting is with edge drawing turned off. I hope one of the Masters of /View can guide me through this semi-documented dark cave of poor performance. Otherwise, enjoy ;-) -- Chris --