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

Home » Public Forums » archive » Re: Important object lesson
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Important object lesson [message #12082] Sun, 28 June 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phillip David (pdavid@earthling.net) writes:

> I've been doing some more playing around with objects, and learned that there
> is a HUGE difference between creating an object with a null constructor and
> destructor and creating an object with no constructor or destructor.

> [Code with and without constructors and destructors snipped.]

> When I actually timed these two methods, I found that there was a factor of
> about 200,000 times between the two. WOW! I had time to create and destroy
> 200,000 test1 objects for every test2 object I created.
>
> The moral of this story is: ALWAYS define your constructors and destructors
> when defining IDL objects.

Actually, I think this is a function of how many directories you have
on your path. If the INIT and CLEANUP methods are not compiled when
IDL has to use them, it looks for a file named myclass__init.pro or
myclass__cleanup.pro in the directories specified by the !PATH
system variable. If you have a lot of files there, it can take
a long time!

Cheers,

David
___
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: Color in MPEGs ???
Next Topic: Keyword_Set vs N_Elements Re: Problems with CW_FSLIDER

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

Current Time: Sun Oct 12 00:22:32 PDT 2025

Total time taken to generate the page: 1.01067 seconds