Re: Question about protection of raw partition and shared libraries
Posted in 1992
Path: emory!samsung!think.com!mips!swrinde!cs.utexas.edu!asuvax!anasaz!qip!briand From: briand@anasaz (Brian Douglass) Newsgroups: comp.databases.informix Message-ID: <1992Mar1.011328.17509@anasaz> Date: 1 Mar 92 01:13:28 GMT References: <1992Feb27.000349.7400@inftec.be> <1625@das13.snide.com> Organization: Anasazi, Inc. Phoenix, Az In article <1625@das13.snide.com> dave@das13.snide.com (Dave Snyder) writes: >In article <1992Feb27.000349.7400@inftec.be>, mike@inftec.be (Mike Aerts) writes: >> My second surprise was when I saw the size of compiled 4GL code. >> These are +/- 300K. So I went looking for a shared library for >> Informix, but didn't find it. Can Informix use shared libraries? >> >That' not at all unusual. We have executables >700K! >Are the executables stripped? Have they been compiled with "-O"? > >DAS >-- >David A. Snyder @ Snide Inc. - Folcroft, PA Current Release > is db4glgen-3.4 >UUCP: ..!uunet!das13!dave INTERNET: Dave.Snyder@snide.com If you code your 4GL the way the examples are in the book, then huge code should be expected. However, if you use dynamic SQL statements and make your functions generalized (like C), you can bring this WAY down. Also, if you look at the ESQL/C and C output of the 4GL compiler, it no wonder code gets so huge. Just to increment a variable goes from a 4GL statment like this: LET x1 = x1 + 1 to a C call like pushshort(x1); pushint(1); _doadd(); popshort(&x1); status = _expcode; if (status < 0) /* * SQL SEES BLOCK BEGINNING */ { fgl_fatal(fgl_modname, 4, status); /* * SQL SEES BLOCK ENDING */ } When obviosly x1++ is much more efficient. Write you programs so that they're in 4GL where that is most useful, and C when that is most efficient. (Ah the price of portability) If such large executables are a problem, you might think of using the Psuedo compiler and runner. Such programs are very small, though if you're making C calls what a pain they are to put into the runner. -- Brian Douglass briand%anasaz.UUCP@asuvax.eas.asu.edu 602-870-3330 X657