Bloated EXEs

Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 8:59 am

Dear friends,

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

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bloated EXEs

Postby Antonio Linares » Sat May 28, 2016 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bloated EXEs

Postby Antonio Linares » Sat May 28, 2016 9:47 am

Enrico,

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

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

Re: Bloated EXEs

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

Re: Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 12:37 pm

I found the culprit! I removed xbrowse module and now I get:

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bloated EXEs

Postby Willi Quintana » Sat May 28, 2016 1:00 pm

Hi,
I use to compress exe upx without reducing its processing speed
Regards
User avatar
Willi Quintana
 
Posts: 1019
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú

Re: Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 1:34 pm

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

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

Re: Bloated EXEs

Postby Antonio Linares » Sat May 28, 2016 3:23 pm

Enrico,

You may try to use dummy functions to replace them
regards, saludos

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

Re: Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 3: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bloated EXEs

Postby nageswaragunupudi » Sat May 28, 2016 4: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bloated EXEs

Postby Enrico Maria Giordano » Sat May 28, 2016 4: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bloated EXEs

Postby nageswaragunupudi » Sat May 28, 2016 4:57 pm

Yes, menu system grew a lot too
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests