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

Home » Public Forums » archive » Re: copying of objects
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: copying of objects [message #32452 is a reply to message #32450] Tue, 08 October 2002 07:39 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, david@dfanning.com writes:
>
> Sebastian Loebbert (sebaaihb@peach.zrz.TU-Berlin.DE) writes:
>
>> thanks a lot, so it was not only me not finding the right
>> function but RSI not providing one.
>> That save-and-restore works fine, but I suppose I better
>> shouldn't use it too often, it doesn't look that performant...
>
> I don't know about "performant". When its the only
> alternative, I'd say it looks pretty darn good.

I've been playing around with saving objects recently and have
discovered some gotchas.

Performance is one. A 10 Mb dataset of mostly integer type that
takes under a second to read in from the raw binary file takes over
thirty second to save and about the same again to read in. Much faster
to write a copy method.

Also, if you seperate the saving and restoring into different
procedures you can run into some problems with namespace contamination.
I konw JD Smith and C. Markwardt have addressed this in their routines.


One extra tidbit that hit me hard until I figured out what was going
on was that if you save multiple objects in the same file and restore
later, the order that they appear in the RESTORED_OBJECTS array has
nothing to do with their hierarchy but is the order in which they were
oringinally created. If you use containers a lot, this can throw you out
of sync badly, particularly if the container is created after the
containees. Then, you have to do some digging to find out which of the
restored objects contains the others.

I don't want to say any more because this knowledge is the only way
I can compensate for my appalling hand-eye coordination and lack of
tennis ability at the up-coming meeting of the European Section of the
Advanced Programmers' Guild.


Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating JPEG files
Next Topic: Need help with HDF_VD_WRITE!!!

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

Current Time: Fri Oct 10 11:15:10 PDT 2025

Total time taken to generate the page: 1.83999 seconds