Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / docs / minimumTAO.html
blob1824e870480415ee7ae2eef0d681ea42727ff922
1 <!-- -->
3 <html>
4 <head>
5 <title>Minimum TAO</title>
6 <link rev=made href="https://github.com/DOCGroup/ACE_TAO">
7 </head>
9 <body text = "#000000"
10 link="#000fff"
11 vlink="#ff0f0f"
12 bgcolor="#ffffff">
14 <hr>
15 <p>
17 <strong>Minimum TAO</strong>
18 <p>
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:
24 <OL>
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
35 the <a href
36 ="http://www.omg.org/technology/documents/formal/">CORBA</a>
37 specification. <P>
38 <ul>
39 <li>Dynamic Skeleton Interface<br>
40 <li>Dynamic Invocation Interface<br>
41 <li>Dynamic Any<br>
42 <li>Interceptors<br>
43 <li>Interface Repository<br>
44 <li>Advanced POA features<br>
45 <li>CORBA/COM interworking<br>
46 </ul>
47 </OL>
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
52 <OL>
53 <LI> <a
54 href="../../ACE-INSTALL.html">Configure</a> ACE to support only those
55 components that are required by TAO and <P>
56 <LI> <a href =
57 "../../TAO/TAO-INSTALL.html">Configure</a> TAO to only support the
58 components specified by the <em>minimumCORBA</em> specification.
59 </OL>
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
69 on SunOS5.7<P>
71 The <a
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>
78 <UL>
79 <LI> No debugging
80 <LI> Optimization is set to -O2
81 <LI> Static ACE and TAO libraries
82 <LI> Use of RCS Ids is turned off
83 </UL>
84 <p>
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>
92 <HR>
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:
103 <ul>
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
110 enabled.<p>
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
119 places in ACE. This
120 isn't really a subsetting problem, but is necessary to
121 fully take advantage of optimizations available on C++ compilers for
122 embedded systems.<p>
123 </ul>
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.
133 </P>
136 <TABLE CELLPADDING=4 BORDER=4>
137 <TR>
138 <TD>Component</TD><TD>Impact</TD><TD>Effort</TD>
139 <TD>Description</TD>
140 </TR>
141 <TR>
142 <TD>ACE</TD><TD>14 Kb</TD><TD>4 weeks</TD>
143 <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.
148 </TD>
149 </TR>
150 <TR>
151 <TD>ACE</TD><TD>20 Kb</TD><TD>4 weeks</TD>
152 <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.
159 </TD>
160 </TR>
161 <TR>
162 <TD>TAO</TD><TD>10-15 Kb</TD><TD>1-2 weeks</TD>
163 <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.
168 </TD>
169 </TR>
170 <TR>
171 <TD>TAO</TD><TD>3-10 Kb</TD><TD>1-2 weeks</TD>
172 <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
176 applications.
177 </TD>
178 </TR>
179 <TR>
180 <TD>TAO</TD><TD>10 Kb</TD><TD>2 weeks</TD>
181 <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.
185 </TD>
186 </TR>
187 <TR>
188 <TD>TAO</TD><TD>5 Kb</TD><TD>1 week</TD>
189 <TD>
190 Move the less common transport muxing and reply waiting
191 strategies to an optional library.
192 </TD>
193 </TR>
194 <TR>
195 <TD>ACE+TAO</TD><TD>30 Kb</TD><TD>8 weeks</TD>
196 <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
202 model is enabled.
203 </TD>
204 </TR>
205 <TR>
206 <TD>TAO</TD><TD>&gt;50 Kb</TD><TD>6 weeks</TD>
207 <TD>
208 Move <CODE>&lt;&lt;=</CODE> and <CODE>&gt;&gt;=</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.
213 </TD>
214 </TR>
215 </TABLE>
216 </P>
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>
223 <UL>
224 <LI><P>
225 Using profiling tools, such as gprof, Quantify and True Coverage
226 to find unreachable code, or code only reachable in certain
227 applications.
228 </P></LI>
229 <LI><P>
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
236 modes.
237 </P></LI>
238 <LI><P>
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
242 by both services.
243 </P></LI>
244 <LI><P>
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.
249 </P></LI>
250 <LI><P>
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.
256 </P></LI>
257 <LI><P>
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.).
261 </P></LI>
262 <LI><P>
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.
266 </P></LI>
267 </UL>
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
272 100-200 Kbytes.
274 </body>
275 </html>