Re: Minimize the size of 4ge ?
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues, Internationalization & Character Sets
4GL 7.2x includes the GLS libraries as well, which will increase the
size of the executable. We use the -shared directive in c4gl and the
'strip' (Unix) command to shrink the executable size somewhat.
John Carlson
Informix DBA
WHSmith USA
Ph. Chantry wrote:
>
> Hi all.
>
> We are to migrate our development server from:
> SCO OS 5.0.4
> C compiler provided by SCO (SCO Development System)
> INFORMIX-4GL Version 6.04.UC1
>
> to:
> Solaris 7
> C compiler = gcc
> INFORMIX-4GL Version 7.20.UD7
>
> Our problem: the applications compiled from the same source codes have very
> different sizes on both the systems:
>
> Test source codes:
>
> # cat c.c
> main()
> {
> printf("Hello !\\n");
> }>
> # cat 4gl.4gl> MAIN
> DISPLAY "Hello !"
> END MAIN
>
> After compilation on both servers:
> # cc c.c
> # c4gl 4gl.4gl -o 4gl.4ge
>
> we have on the old SCO box:
> # ls -l a.out 4gl.4ge
> -rwxr-xr-x 1 owner group 620856 Sep 24 09:45 4gl.4ge*
> -rwxr-xr-x 1 owner group 46330 Sep 24 09:45 a.out*>
> and on the new SOLARIS box:
> # ls -l a.out 4gl.4ge
> -rwxr-xr-x 1 owner group 1420508 Sep 24 09:45 4gl.4ge*
> -rwxr-xr-x 1 owner group 24364 Sep 24 09:45 a.out*>
> So, on the new server, the C program is about twice smaller, while the 4ge
> is about twice bigger !
> Obviously, the growth of the size of the 4ge is not due to the C compiler,
> but to c4gl.
>
> Our question: is it a way to customize the behavior of c4gl, in order to
> minimize the size of 4ge ?
>
> Thanks in advance.
Does this improve performance by smaller executable sizes; by load time into
memory and execution time because of less code to "wade through"?
"Carlson@WHSmith" wrote:
> 4GL 7.2x includes the GLS libraries as well, which will increase the
> size of the executable. We use the -shared directive in c4gl and the
> 'strip' (Unix) command to shrink the executable size somewhat.
>
> John Carlson
> Informix DBA
> WHSmith USA
>
> Ph. Chantry wrote:
> >
> > Hi all.
> >
> > We are to migrate our development server from:
> > SCO OS 5.0.4
> > C compiler provided by SCO (SCO Development System)
> > INFORMIX-4GL Version 6.04.UC1
> >
> > to:
> > Solaris 7
> > C compiler = gcc
> > INFORMIX-4GL Version 7.20.UD7
> >
> > Our problem: the applications compiled from the same source codes have very
> > different sizes on both the systems:
> >
> > Test source codes:
> >
> > # cat c.c
> > main()
> > {
> > printf("Hello !\\n");
> > }> >
> > # cat 4gl.4gl> > MAIN
> > DISPLAY "Hello !"
> > END MAIN
> >
> > After compilation on both servers:
> > # cc c.c
> > # c4gl 4gl.4gl -o 4gl.4ge
> >
> > we have on the old SCO box:
> > # ls -l a.out 4gl.4ge
> > -rwxr-xr-x 1 owner group 620856 Sep 24 09:45 4gl.4ge*
> > -rwxr-xr-x 1 owner group 46330 Sep 24 09:45 a.out*> >
> > and on the new SOLARIS box:
> > # ls -l a.out 4gl.4ge
> > -rwxr-xr-x 1 owner group 1420508 Sep 24 09:45 4gl.4ge*
> > -rwxr-xr-x 1 owner group 24364 Sep 24 09:45 a.out*> >
> > So, on the new server, the C program is about twice smaller, while the 4ge
> > is about twice bigger !
> > Obviously, the growth of the size of the 4ge is not due to the C compiler,
> > but to c4gl.
> >
> > Our question: is it a way to customize the behavior of c4gl, in order to
> > minimize the size of 4ge ?
> >
> > Thanks in advance.
I haven't been able to quantify the performance benefit, but I have
noticed a smaller 4ge memory footprint. As we were pressed for memory a
while back, this was an improvement.
John Carlson
Informix DBA
WHSmith USA
David McNight wrote:
>
> Does this improve performance by smaller executable sizes; by load time into
> memory and execution time because of less code to "wade through"?
>
> "Carlson@WHSmith" wrote:
>
> > 4GL 7.2x includes the GLS libraries as well, which will increase the
> > size of the executable. We use the -shared directive in c4gl and the
> > 'strip' (Unix) command to shrink the executable size somewhat.
> >
> > John Carlson
> > Informix DBA
> > WHSmith USA
> >
> > Ph. Chantry wrote:
> > >
> > > Hi all.
> > >
> > > We are to migrate our development server from:
> > > SCO OS 5.0.4
> > > C compiler provided by SCO (SCO Development System)
> > > INFORMIX-4GL Version 6.04.UC1
> > >
> > > to:
> > > Solaris 7
> > > C compiler = gcc
> > > INFORMIX-4GL Version 7.20.UD7
> > >
> > > Our problem: the applications compiled from the same source codes have very
> > > different sizes on both the systems:
> > >
> > > Test source codes:
> > >
> > > # cat c.c
> > > main()
> > > {
> > > printf("Hello !\\n");
> > > }> > >
> > > # cat 4gl.4gl> > > MAIN
> > > DISPLAY "Hello !"
> > > END MAIN
> > >
> > > After compilation on both servers:
> > > # cc c.c
> > > # c4gl 4gl.4gl -o 4gl.4ge
> > >
> > > we have on the old SCO box:
> > > # ls -l a.out 4gl.4ge
> > > -rwxr-xr-x 1 owner group 620856 Sep 24 09:45 4gl.4ge*
> > > -rwxr-xr-x 1 owner group 46330 Sep 24 09:45 a.out*> > >
> > > and on the new SOLARIS box:
> > > # ls -l a.out 4gl.4ge
> > > -rwxr-xr-x 1 owner group 1420508 Sep 24 09:45 4gl.4ge*
> > > -rwxr-xr-x 1 owner group 24364 Sep 24 09:45 a.out*> > >
> > > So, on the new server, the C program is about twice smaller, while the 4ge
> > > is about twice bigger !
> > > Obviously, the growth of the size of the 4ge is not due to the C compiler,
> > > but to c4gl.
> > >
> > > Our question: is it a way to customize the behavior of c4gl, in order to
> > > minimize the size of 4ge ?
> > >
> > > Thanks in advance.