EXE size is growing

EXE size is growing

Postby Enrico Maria Giordano » Sun Dec 20, 2009 5:24 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby nageswaragunupudi » Mon Dec 21, 2009 2: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
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: EXE size is growing

Postby Antonio Linares » Mon Dec 21, 2009 7:11 am

Enrico,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: EXE size is growing

Postby Enrico Maria Giordano » Mon Dec 21, 2009 8: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
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby Enrico Maria Giordano » Mon Dec 21, 2009 8:29 am

Antonio Linares wrote:Enrico,

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


Yes:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    RETURN NIL


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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby Antonio Linares » Mon Dec 21, 2009 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: EXE size is growing

Postby Enrico Maria Giordano » Mon Dec 21, 2009 8: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: Select all  Expand view
FUNCTION MAIN()

    USE TEST

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby Antonio Linares » Mon Dec 21, 2009 10:54 pm

Enrico,

OLE support should be also added :-)

CreateObject()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: EXE size is growing

Postby Enrico Maria Giordano » Mon Dec 21, 2009 11:03 pm

Code: Select all  Expand view
FUNCTION MAIN()

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

    oWord:Quit()

    USE TEST

    RETURN NIL


xHarbour: 787968

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby Antonio Linares » 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: Select all  Expand view

function TWindow()
return nil
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: EXE size is growing

Postby Enrico Maria Giordano » Tue Dec 22, 2009 7: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" :-)


:lol: :lol: :lol:

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: Select all  Expand view

function TWindow()
return nil
 


Thanks for the tip.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: EXE size is growing

Postby Antonio Linares » Tue Dec 22, 2009 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Re: EXE size is growing

Postby nageswaragunupudi » Wed Dec 30, 2009 3:35 pm

With FWH 9.12
Code: Select all  Expand view
#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
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: EXE size is growing

Postby Enrico Maria Giordano » Wed Dec 30, 2009 11:15 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8411
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: richard-service and 135 guests