[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why is using objects so much slower ?

Henkie (deckard_007nospam@deja.com) writes:
> because I love object oriented programming, I decided to try the objects in
> IDL too.  However, when using the objects to plot some of my stuff, it
> turned out to be soooooo sloooow.  Really, I mean a factor of 10 or so, and
> I wasn't doing anything funky.  Is this normal behaviour ?  I'm actually
> quite disappointed about it that I can not use it this way.  I must add that
> IDL on our HP9000 system isn't a speed champion (let alone the awfull
> pseudo-coloring : oops, my program ate all my colors), but at least it was
> useable.

There is no question object graphics can sometimes be slower
than direct graphics. Often this is caused by less
than optimal programming practice, but it also has
to do with lugging a true 3D representation along everywhere
you go. To be honest, this has become less an issue
as computers have gotten faster.

But, line plots!? Why would you *want* to do those
in object graphics? If you love object programming,
code up an object to do a line plot in direct graphics.
You get about 99% of the benefit of object graphics in
an object that is fast and powerful. At least 90% of
the objects I write don't use the object graphics class
library at all.



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155