From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,65f09e2d2d4dad56 X-Google-Attributes: gid103376,public From: "Marin D. Condic" Subject: Re: Representation Clauses And Freezing Date: 2000/07/22 Message-ID: <397A1247.F1DE7505@acm.com>#1/1 X-Deja-AN: 649581588 Content-Transfer-Encoding: 7bit References: <3979C22C.627F3C89@acm.com> Organization: Quadrus Corporation X-Sender: "Marin D. Condic" (Unverified) X-Server-Date: 22 Jul 2000 21:29:49 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-07-22T21:29:49+00:00 List-Id: tmoran@bix.com wrote: > You can really do a lot with Streams. You can of course define a > 'Write to one child of Root_Stream_Type that puts the bytes of the > data object into a Stream_Element_Array. But a different child of I've played with streams and the 'Read/'Write stuff and I like it a lot. I believe my posted examples on my webpage utilize this - or I have one around here somewhere.... (where did I put it??? :-) For stuff on a PC or workstation using TCP/IP as the transport, I'd agree that this is the way to go. Either using the defaults or rolling your own, you could pretty much handle the representation issues in that manner. The problem is if you have this sort of thing on a hard real time system with possibly limited memory and not much spare CPU. You really need to minimize the data motion and whatever overhead is associated with the 'Read and 'Write. When I've tinkered with this, it seems to degenerate into some kind of procedure call for each field of the record. That can translate into significant time. Also, you are moving the data out of the record and into a temporary stream, then out of the stream and into some hardware buffer (maybe) and that translates into more overhead. Using an overlay of a Stream_Element_Array, you can avoid this. Please don't get me wrong - I wouldn't avoid Ada.Streams in most applications because the overhead for data motion, etc., would likely be unimportant. It's a clever way of getting there and would work quite well. I just want to build a subsystem that doesn't depend on this as a necessity so that it could be usable in tough situations. MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity." -- Martin Luther King, Jr ======================================================================