home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!gatech!news.ans.net!cmcl2!adm!news
- From: lee@cpu.us.dynix.com (Lee Crites)
- Newsgroups: comp.lang.pascal
- Subject: Optimizaion with Objects....
- Message-ID: <35257@adm.brl.mil>
- Date: 27 Jan 93 22:57:18 GMT
- Sender: news@adm.brl.mil
- Lines: 41
-
-
- Here's a nice juicy one that will thrill the hearts of the techies out
- there...
-
- I know that TP has an optimizing compiler, which removes unused/unneeded
- code from your program before generating the .EXE file. This is fine, and
- I have exploited this to the max in some of the units that I have created.
-
- Now for the question: does it also remove unused methods from an object?
-
- I would assume that this question is NO in the case of compiling a UNIT,
- since it is assumed that you might spawn children off of it later, and
- need all of the method(s) later. But, what about in a program, where the
- object is in one of the units that I include?
-
- Lets take a really obvious example. What if I had an object, TCanDoItAll,
- with 1,000 methods and fields. In one program, I include this object, and
- use only 5 of the methods and fields. Will the optimizing step remove the
- other 995 methods and fields?
-
- I guess that I could experiment with this, and generate a little (?) test,
- but before I spend hours at the keyboard making methods like AA, AB, AC,
- ... ,ZZZ, I thought that I'd ask, just in case somebody else knew one way
- or the other.
-
- This will dramatically affect the way that we continue with our conversion
- into OOP.
-
- Thanks muchly, in advance, for any/all help.
-
- P.S. Yes, I've RTFM, and couldn't find the answer. If it's in there,
- please give the reference.
-
- P.P.S. If you want to reply to me instead of the forum, I'll either
- forward it on, or just summarize what I get.
-
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- lee@us.dynix.com | If it ain't broke yet,
- | let me have a shot at it....
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-