comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Help! Slow object graphics.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Help! Slow object graphics. [message #29464] Tue, 19 February 2002 15:29
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
Partly as a learning exercise, and partly based on advice from the
newsgroup, I went ahead and wrote a 2D object graphics program based on
XROI. The graphics tree branches out from the XROI graphics tree, which
is to say the graphics hierarchy in my program shares its basic
structure with XROI. The drawing functions are essentially borrowed
from XROI as well.

The problem is that drawing in my program is ridiculously slow, much
slower than in XROI. During freehand drawing the pixels activated on
screen lag noticeably behind the cursor position. Simple animations
where I erase and redraw sequences of filled ~20-vertex polygons are
also very slow, and take three times as long as in an earlier direct
graphics version of the same program.

The big difference is that my program is written as an object widget,
since I envisioned subclassing it into several specialized ROI analysis
programs. So everything might be buried a little deeper in the heap
(pointers to pointers), although I notice that the info structure of
XROI is in a pointer as well... Anyway, can this really account for
the marked reduction in speed? If not, then I can't figure it out,
since as far as I can tell my program is using almost exactly the same
draw functions and graphics hierarchy as the faster XROI. There are no
PRINT or HELP statements slowing things down by writing to the output
log. The computer I'm using is not great, but is fairly new--733MHz Mac
G4, 32Mb NVidia GeForce 2Mx, 256Mb + 895Mb(Virtual) RAM.

I convinced my employer that converting my DG program to OG was worth
the week it's taken, but I'm not sure he'll be so pleased to see that
everything is slower than it was before... I thought object graphics
weren't supposed to be so slow these days, so it must be the way I'm
programming, although I really just copied XROI for the drawing part of
the program. I hope it's not the heap thing, because I depend on the
object widget functionality... Any ideas? Thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Floating Array Shows no numbers after the dot
Next Topic: color problems

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:55:42 PDT 2025

Total time taken to generate the page: 0.00633 seconds