Although people always think the slowest part of their code is the 
incredible calculations performed, in 25 years of programming I can tell 
you that it is pratically never the case.  The slowest part has always been 
I/O, specifically:

: Accessing a disk
: Putting bits on the screen
: Talking to external devices
: String comparisons (okay, not I/O, but still slow)
: Floating point math in the "old days" (pre-FPU, but still problematic)

Sitting in the CPU breaking apart lists or talking to objects is not a big 
deal (although you could in theory make it awful).  Assembling 32-bit 
images at 640x480 and moving it to video is MUCH slower, particularly 30 
times a second, or whatever you're doing.

Any time I've taken a profiler to code, and this includes C and assembly, 
it has ALWAYS been the I/O that has bogged everything down (and in the 
early years, floating point, but that's not so much an issue now), and 
almost never the complicated 'if' statements or whatever.

That said, I have no idea how you wrote your code, but if you have a lot of 
drawing to the stage, I would definitely look at that first.  If you want 
to eliminate that as a problem area, I suggest copying your program, 
converting all your graphics to simple one-line outlines (rectangles, etc.) 
and reducing the frame rate, and see what happens.

Also note that in Director, frequent updates to on-screen text fields are 
outrageously slow, just in case you have any of those.

- Tab

At 11:32 PM 11/11/01 -0800, James Tu wrote:
>Has anyone done any performance testing with the following:
>
>Using objects vs. just using lists to keep track of properties, etc.
>
>I spawned hundreds of objects and they all animate and it really slowed 
>the movie down.
>Do you think that NOT using objects will help the performance?  Or do you 
>think that the bottleneck is drawing to the stage, so that even if I used 
>a list to keep track of info, the performance would be the same?


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to