5 <title>Minimum TAO
</title>
6 <link rev=made
href=
"https://github.com/DOCGroup/ACE_TAO">
17 <strong>Minimum TAO
</strong>
20 In addition to our work on
<A HREF=
"../../docs/ACE-subsets.html">ACE
21 subsetting
</A>, we have also been reducing the footprint of TAO. We
22 are pursuing two complementary strategies to reduce TAO's footprint:
26 <LI> <B><EM>Implicit subsetting
</EM></B>, e.g., by reducing
27 dependencies in the TAO library so that programs need not link
28 unused TAO components.
<P>
30 <LI> <B><EM>Explicit subsetting
</EM></B>, e.g., by supporting the
<a
31 href=
"http://www.omg.org/cgi-bin/doc?orbos/98-08-04.pdf"><em>minimumCORBA
32 </em></a> specification to
<a href =
33 "http://www.dre.vanderbilt.edu/~schmidt/TAO.html">TAO
</a>. The
<em>
34 minimumCORBA
</em> specification removes the following features from
36 =
"http://www.omg.org/technology/documents/formal/">CORBA
</a>
39 <li>Dynamic Skeleton Interface
<br>
40 <li>Dynamic Invocation Interface
<br>
43 <li>Interface Repository
<br>
44 <li>Advanced POA features
<br>
45 <li>CORBA/COM interworking
<br>
49 The implicit subsetting of TAO requires no explicit application
50 programmer intervention. In contrast, to minimize the footprint of
51 TAO explicitly, you must
54 href=
"../../ACE-INSTALL.html">Configure
</a> ACE to support only those
55 components that are required by TAO and
<P>
57 "../../TAO/TAO-INSTALL.html">Configure
</a> TAO to only support the
58 components specified by the
<em>minimumCORBA
</em> specification.
61 The following two tables show the footprint reduction achievable via
62 explicit subsetting. Note that the IDL Compiler column refers to the
63 code required to collaborate between the IDL compiler and the ORB, and
64 not to the code for the IDL compiler itself.
66 <p><hr width=
50% align=left
> <p>
68 Note: All measurement are for ACE
5.0 and TAO
1.0 using egcs-
2.91.60
72 href=
"../../ACE-INSTALL.html#flags">make
73 flags
</a> options used were:
<P>
75 <code> debug=
0 optimize=
1 static_libs_only=
1</code> <P>
77 These options translate into:
<P>
80 <LI> Optimization is set to -O2
81 <LI> Static ACE and TAO libraries
82 <LI> Use of RCS Ids is turned off
86 To build a TAO static library, if shared libraries are the default,
87 use
<code>make static_libs_only=
1</code> (make sure to do this for
88 ACE, as well). If you're using recent versions of GNU GCC, you can
89 use the
<A HREF=
"../../ACE-INSTALL.html#repo">-frepo
</A> option, which
90 typically reduces the footprint by another
25 percent.
<P>
94 <h3><a name=
"Status">ACE+TAO Subsetting Work in Progress
</a></h3>
96 We've been tracking the footprint reduction of ACE+TAO periodically
97 since April,
2000. All the statistics are available
<A
98 HREF=
"http://www.dre.vanderbilt.edu/Stats/footprint.shtml">online
</A>. As the result of
99 this prior work, we've identified various areas for improvement that
100 we're now addressing. For example, the following are the remaining
101 areas for ACE subsetting:
104 <li><EM><B>Log_Msg decoupling
</EM></B> -- We have a good start on this, but it needs work
105 to finish. It might be easiest to make an abstract
106 base class, then have ACE_Log_Msg derive from it. That way
107 we could remove the exposure of all the #includes in Log_Msg.cpp
108 to applications that don't need it. Another alternative would
109 be to disable compilation of Log_Msg.cpp when ACE_NLOGGING is
112 <li><EM><B>Higher layer interdependencies
</EM></B> -- We haven't
113 exhaustively tested all possible combinations of subsets. It's possible
114 that there are interdependencies between some layers that
115 we haven't yet identified and removed.
<p>
117 <li><EM><B>Remove reliance on multiple inheritance
</EM></B> -- Multiple
118 inheriance is only used in a few
120 isn't really a subsetting problem, but is necessary to
121 fully take advantage of optimizations available on C++ compilers for
125 We anticipate that these changes should reduce the default size of ACE
126 by around
100-
200 kbytes.
<P>
128 As the effort to reduce TAO's footprint continues, we are planning
129 several modifications for TAO that should reduce the footprint for
130 both the full CORBA and minimum CORBA configurations by around
300-
400
131 Kbytes. The list below contains an estimate of the impact of each one
132 of these changes, along with the estimated effort to implement them.
136 <TABLE CELLPADDING=
4 BORDER=
4>
138 <TD>Component
</TD><TD>Impact
</TD><TD>Effort
</TD>
142 <TD>ACE
</TD><TD>14 Kb
</TD><TD>4 weeks
</TD>
144 Implement a TAO-specific Reactor.
145 ACE's reactor supports a number of features that TAO does not
146 require. Thus, a TAO-specific implementation is an important way to
147 reduce the footprint.
151 <TD>ACE
</TD><TD>20 Kb
</TD><TD>4 weeks
</TD>
153 Implement a TAO-specific Service Configurator.
154 TAO uses the ACE Service Configurator to dynamically configure
155 its strategies. In many embedded applications the set of
156 strategies are selected at design-time, on those platforms it
157 would be appropriate to disable all the features to
158 dynamically load components into the ORB.
162 <TD>TAO
</TD><TD>10-
15 Kb
</TD><TD>1-
2 weeks
</TD>
164 Eliminate duplicate code due to instantiations of string -
>
165 pointer maps. TAO uses several such maps, they could be replaced by a
166 generic version, wrapped with a fully inlined (i.e. zero
167 footprint) adapter for type-safety.
171 <TD>TAO
</TD><TD>3-
10 Kb
</TD><TD>1-
2 weeks
</TD>
173 Make message buffering strategies optional.
174 TAO supports policy extensions to control the outgoing oneway and AMI
175 request buffers. Those policies are not used by all
180 <TD>TAO
</TD><TD>10 Kb
</TD><TD>2 weeks
</TD>
182 Make support for multiple ORBs optional.
183 TAO can support multiple ORBs in the same process, but most
184 applications only require one.
188 <TD>TAO
</TD><TD>5 Kb
</TD><TD>1 week
</TD>
190 Move the less common transport muxing and reply waiting
191 strategies to an optional library.
195 <TD>ACE+TAO
</TD><TD>30 Kb
</TD><TD>8 weeks
</TD>
197 Decouple ACE (and then TAO) from the
198 <CODE>ACE_Thread_Manager
</CODE> component.
199 This component is only used in the thread-per-connection
200 model, if we could decouple it in ACE then TAO could be
201 modified to only link this component when that concurrency
206 <TD>TAO
</TD><TD>>50 Kb
</TD><TD>6 weeks
</TD>
208 Move
<CODE><<=
</CODE> and
<CODE>>>=
</CODE>
209 operators to separate files.
210 Currently TAO includes nearly
500 such operators, moving them
211 to separate files (grouped by component?) would eliminate them
212 from most applications.
218 <P>In parallel with the activities described above we are pursuing
219 other avenues of research to find sources of rarely used or unused
220 code in ACE+TAO, and to modify the software to eliminate such code.
221 These activities include the following:
</P>
225 Using profiling tools, such as gprof, Quantify and True Coverage
226 to find unreachable code, or code only reachable in certain
230 The code TAO's IDL compiler generates for
<CODE>CORBA::Any
</CODE>
231 operators is large, so we are evaluating designs that reduce the impact of the
<CODE>CORBA::Any
</CODE>
232 type support. TAO's IDL compiler already makes that support optional.
233 However, for applications that require
<CODE>Anys
</CODE> it may be useful to separate that code
234 in another file to reduce the size of generated stubs and skeletons,
235 without losing the opportunity to use more dynamic CORBA invocation
239 The Notification Service currently depends on the Trading service to
240 implement the Trader Constraint Language. We are planning to break that
241 dependency and factor the TCL parser into a smaller library shared
245 TAO still contains features that are rarely or never used.
246 Examples include the interfaces to query the well-known services and
247 to dynamically discover the level of security support. Those
248 components should only be linked (dynamically) in applications that require them.
251 The support for interceptors currently generated by the IDL compiler
252 can be partially refactored into common ORB code.
253 Moreover, we evaluating a new implementation of interceptors
254 that can be configured dynamically, thereby eliminating the need for
255 compile-time configuration flags.
258 We are planning to provide compile-time flags to eliminate certain mandatory features
259 in CORBA that are not used in all applications, such as IOR
260 parsers (corbaloc, corbaname, etc.).
263 Finally, we will perfom more code inspections to determine if template code can be
264 refactored into base classes and thereby shared by many objects in
265 the ACE+TAO implementations.
269 Although we do not yet have sufficient insights to know how much
270 footprint reduction these activities will afford, we anticipate these
271 enhancements could reduce the default footprint of TAO by another