FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EXE size is growing
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
EXE size is growing
Posted: Sun Dec 20, 2009 05:24 PM

I wonder why the size of the EXEs generated with FWH is growing so much in the last times.

EMG

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 02:32 AM

All the new developments are resulting in linking of many new functions, all of which may or may not be really necessary for the actual application.

Probably we may need to examine what all the functions that are included in the final exe and split some library modules so that only the needed functions are linked.

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 07:11 AM

Enrico,

Have you compared the size of an EXE with and without FWH ? :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 08:25 AM
nageswaragunupudi wrote:All the new developments are resulting in linking of many new functions, all of which may or may not be really necessary for the actual application.

Probably we may need to examine what all the functions that are included in the final exe and split some library modules so that only the needed functions are linked.


That's what exactly what I had in my mind but I think it would be too much work for our friend and master Antonio.

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 08:29 AM
Antonio Linares wrote:Enrico,

Have you compared the size of an EXE with and without FWH ? :-)


Yes:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    RETURN NIL


Harbour: 615424
Harbour+FWH: 1817600
xHarbour: 765952
xHarbour+FWH: 1887232

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 07:35 PM

Enrico,

Please add a RDD function call (i.e. DbCreate()) to force the link of the RDD system in the non FWH app

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 08:50 PM
Antonio Linares wrote:Enrico,

Please add a RDD function call (i.e. DbCreate()) to force the link of the RDD system in the non FWH app


Done:

Harbour: 615936
xHarbour: 765952

This is the sample:

Code (fw): Select all Collapse
FUNCTION MAIN()

    USE TEST

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 10:54 PM

Enrico,

OLE support should be also added :-)

CreateObject()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 11:03 PM
Code (fw): Select all Collapse
FUNCTION MAIN()

    LOCAL oWord := CREATEOBJECT( "Word.Application" )

    oWord:Quit()

    USE TEST

    RETURN NIL


xHarbour: 787968

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXE size is growing
Posted: Mon Dec 21, 2009 11:26 PM
Enrico,

Its almost impossible to reduce size due the use of Object Oriented programming, because classes inherit ones from anothers so finally we get the whole "gorilla" even if we just want the "banana" :-)

http://en.wikipedia.org/wiki/Object-oriented_programming


Joe Armstrong, the principal inventor of Erlang, is quoted as saying "The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle."


Anyhow when you are going to build a professional app you do need all those classes. In case that you are just going to build a small tool and not a complete app, then you can replace FWH Classes with dummy functions to remove the "gorilla" :-)
Code (fw): Select all Collapse
function TWindow()
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Tue Dec 22, 2009 07:52 AM
Antonio Linares wrote:Enrico,

Its almost impossible to reduce size due the use of Object Oriented programming, because classes inherit ones from anothers so finally we get the whole "gorilla" even if we just want the "banana" :-)


:-) :-) :-)

Yes, but I'm wondering why the size has grown so much in relatively recent times.

Antonio Linares wrote:In case that you are just going to build a small tool and not a complete app, then you can replace FWH Classes with dummy functions to remove the "gorilla" :-)
Code (fw): Select all Collapse
function TWindow()
return nil


Thanks for the tip.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXE size is growing
Posted: Tue Dec 22, 2009 08:07 AM

Enrico,

> Yes, but I'm wondering why the size has grown so much in relatively recent times.

If you build an EXE and review the generated MAP file, there you can see all the modules that get linked in and their sizes.

FWH has grown due to more features requirements and that makes the resulting EXEs grow too. Anyhow those sizes, and much larger, are perfectly managed by modern computers :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: EXE size is growing
Posted: Wed Dec 30, 2009 03:35 PM
With FWH 9.12
Code (fw): Select all Collapse
#include 'fivewin.ch'

function Main()

  msginfo( 'ok' )

return nil

FWH and Harbour 1,389,056
FWH and xHarbour 1,423,360
Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: EXE size is growing
Posted: Wed Dec 30, 2009 11:15 PM

I just tried: it's a wonderful result! My compliments!

EMG

Continue the discussion