FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bloated EXEs
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bloated EXEs
Posted: Sat May 28, 2016 08:59 AM
Dear friends,

EXEs sizes has grown up very much lately. As an example, the following empty function

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


FUNCTION MAIN()

    RETURN NIL


generates an EXE of 3 MB! Is there any way to reduce such a big size?

I'm using latest xHarbour and latest BCC32.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 09:16 AM

Enrico,

Software tends to grow as it grows in complexity and in offered functionalities.

See Windows 10, OSX, Linux, they all grow the same way.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 09:38 AM
Antonio Linares wrote:Enrico,

Software tends to grow as it grows in complexity and in offered functionalities.

See Windows 10, OSX, Linux, they all grow the same way.


Yes, but if one doesn't use the new features why they should be included in the EXE? I mean, probably there are some unexpected and unwanted links between FWH modules. But which?...

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 09:47 AM

Enrico,

You may compare the map files from a previous EXE and your current EXE

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 10:35 AM

I can't, as I haven't previous FWh releases. Can I get map files directly from the EXE?

Anyway, I have some EXEs of 2013 that are less of 2 MB in size! :-(

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 12:37 PM
I found the culprit! I removed xbrowse module and now I get:

Code (fw): Select all Collapse
Error: Unresolved external '_HB_FUN_XBROWSENEW' referenced from E:\FWXHARB\FIVEHX.LIB|TGET
Error: Unresolved external '_HB_FUN_TXBROWS' referenced from E:\FWXHARB\FIVEHX.LIB|XBROWSER
Error: Unresolved external '_HB_FUN_XBRWSETDATASOURCE' referenced from E:\FWXHARB\FIVEHX.LIB|XBROWSER


EMG
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 01:00 PM

Hi,
I use to compress exe upx without reducing its processing speed
Regards

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 01:34 PM

Me too. But the EXE size is still growing up (slower).

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 03:23 PM

Enrico,

You may try to use dummy functions to replace them

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 03:30 PM
Antonio Linares wrote:Enrico,

You may try to use dummy functions to replace them


Yes, but there are many others to replace... :-)

I give up.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Bloated EXEs
Posted: Sat May 28, 2016 04:26 PM

I guess you deleted xbrowse.obj as it has been your preference for long.
If so you have to delete xbrowser.obj too.

New thing is TGet also calls xbrowse. To remove this call, you may comment out function PopupBrowse() in the tget.prg. Next time, I may move this to xbrowse.prg.

To that extent, you need to modify TGet. Once you do that, xbrowse is totally out of your way. You save 250 KB

Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bloated EXEs
Posted: Sat May 28, 2016 04:55 PM
nageswaragunupudi wrote:I guess you deleted xbrowse.obj as it has been your preference for long.
If so you have to delete xbrowser.obj too.

New thing is TGet also calls xbrowse. To remove this call, you may comment out function PopupBrowse() in the tget.prg. Next time, I may move this to xbrowse.prg.

To that extent, you need to modify TGet. Once you do that, xbrowse is totally out of your way. You save 250 KB


No, I haven't deleted anything. I just try to reduce the EXE size that has increased a lot lately. And I'm already using a rewritten TGet (since years) so the problem is not (only) xbrowse. That was only a sample of what probably is the root of the problem. Another big module could be menudraw.c but it can't be avoided, I suppose.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Bloated EXEs
Posted: Sat May 28, 2016 04:57 PM

Yes, menu system grew a lot too

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion