Issue 3708: Small optimization for the GIOP header (interop) Source: University of California, Irvine (Mr. Carlos O'Ryan, nobody) Nature: Uncategorized Issue Severity: Summary: I think I found a possible (very minor) optimization for the GIOP 1.3 spec, but maybe I'm missing something in GIOP 1.2 The new <target> field on the RequestHeader_1_2 structure is always aligned to a 4 byte boundary, the reserved[3] field ensures that. Consequently the discriminant for the TargetAddress union does not end on a 4 byte boundary, but will require 2 bytes of padding following it, since all the union values in this case start on 4 byte boundaries. IMHO, using just 1 byte for the reserved[] field, would have resulted in more natural alignments. Did I get something wrong here? Is this something likely to be fixed in GIOP 1.3? Resolution: Close this issue as too much of a change for this RTF, and add it to the GIOP wish list for future p Revised Text: Actions taken: June 16, 2000: received issue February 27, 2001: closed issue Discussion: The GIOP 1.1 header had a sequence of octet (object key) following the response expected boolean, thus there was automatically three octets of pad included for marshalling. The spec made these three octets explicit, reserving them for future use. In GIOP 1.2, the object key was replaced by the TargetAddress union. The union discriminant is a short, so in fact, the reserved could have been reduced to 1 byte, leaving the last two bytes open for the union discriminant. Thus the optimization stated is correct, however does not warrant, in it own right, migration to a new protocol version 1.3. End of Annotations:===== From: "Carlos O'Ryan" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: <14666.39859.7926.282045@kelvar.ece.uci.edu> Date: Fri, 16 Jun 2000 14:27:15 -0700 (PDT) To: interop@omg.org Subject: Small optimization for the GIOP header X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid Sender: "Carlos O'Ryan" Content-Type: text/plain; charset=us-ascii X-UIDL: ~kCe9"<+!!ji~!!*1gd9 Hi, I think I found a possible (very minor) optimization for the GIOP 1.3 spec, but maybe I'm missing something in GIOP 1.2 The new field on the RequestHeader_1_2 structure is always aligned to a 4 byte boundary, the reserved[3] field ensures that. Consequently the discriminant for the TargetAddress union does not end on a 4 byte boundary, but will require 2 bytes of padding following it, since all the union values in this case start on 4 byte boundaries. IMHO, using just 1 byte for the reserved[] field, would have resulted in more natural alignments. Did I get something wrong here? Is this something likely to be fixed in GIOP 1.3? HTH -- Carlos O'Ryan (coryan@uci.edu) #include #include // "Speak softly and carry a megawatt laser" 1024D/46936992 33B3 C4ED AA90 FA0F E8D1 D509 FE5E 8F79 4693 6992