rs4u+@andrew.cmu.edu (Richard Siegel) (03/25/88)
I've been experimenting with porting a moderately large (500K source, 100K code + 80K resources) application from Lightspeed Pascal to MPW Pascal. This isn't because of any inherent faults in Lightspeed Pascal - it's just so that I can generate a test version of my program that is compiled for use on 68881-equipped Macs. The port went fairly smoothly, but I was amazed at how long a typical build took - to rebuild the whole program from scratch took about 45 minutes in MPW; this is a task that Lightspeed Pascal does in 15 minutes, including build time to write the completed application to disk. At any rate, I noticed that a considerable amount of compilation time is taken sucking the source files for units in a USES clause from disk, and the following occurred to me: Suppose, if after a successful compilation, the compiler were to write a .Dump file to disk? The .Dump file would contain the symbol tables (just the same as dump files created by the $LOAD directive), but upon looking for this unit in the future, the compiler would first look for the .Dump file, and if it's found, use it instead of textually including the unit. Is there anything wrong with this? Of course, the compiler's *still* dog-slow... :-) -R.
lsr@Apple.COM (Larry Rosenstein) (03/26/88)
In article <UWGST3y00WA9I2PlIm@andrew.cmu.edu> rs4u+@andrew.cmu.edu (Richard Siegel) writes: > >At any rate, I noticed that a considerable amount of compilation >time is taken sucking the source files for units in a USES clause >from disk, and the following occurred to me: Suppose, if after >a successful compilation, the compiler were to write a .Dump >file to disk? The .Dump file would contain the symbol tables The $LOAD mechanism does avoid rereading the interfaces. If the $LOAD file exists, it is read instead of the textual interfaces, otherwise the text files are read and the $LOAD file is created. The main problem with $LOAD file is that you have to use a $LOAD file in the same context in each compilation. The information in the $LOAD file depends on the units it includes as well as the units preceeding it in the USES statement. (Some of these issue will be addressed in MPW 3.0, and this whole mechanism will be much more automatic and streamlined.) Using $LOAD speeds up the compilation significantly, although it still is much slower than LSP. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 32E Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr