Horde3D
http://horde3d.org/forums/

Reducing MinGW/GCC and MSVC compiled files size
http://horde3d.org/forums/viewtopic.php?f=5&t=488
Page 1 of 1

Author:  Siavash [ 03.09.2008, 08:21 ]
Post subject:  Reducing MinGW/GCC and MSVC compiled files size

MinGW/GCC compiled files (.dll, .exe, ...) are ~2x larger than MSVC. By using UPX we can compress them and reducing the final file size to ~0.25x of the original file. UPX compressed files have faster loading times because of their small size and they are error free.

Here is my expriments about this :


[Using all MinGW/GCC 3.4.5 optimizations + UPX --best]

ColladaConv.exe (629KB) > 173KB
Horde3D.dll (995KB) > 258KB
Horde3DUtils.dll (303KB) > 93KB


[Using all MSVC2005 Pro optimizations + UPX --best]


ColladaConv.exe (364KB) > 149KB
Horde3D.dll (540KB) > 210KB
Horde3DUtils.dll (180KB) > 77KB

Author:  kal [ 03.09.2008, 09:53 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

did you try using strip before packing with upx?

Author:  Siavash [ 03.09.2008, 10:33 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

kal wrote:
did you try using strip before packing with upx?

I don't know what you mean about strip but I've used "strip all symbols from binary" option in compiling files with MinGW and I didn't use stripping options in UPX, because this is too dangerous and some times makes the compressed file too buggy.
Other benefit of using UPX is that no body can reverse engineer your program by using Resource hacking programs and that will immunize your app from these attacks!

Author:  swiftcoder [ 03.09.2008, 11:34 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

Siavash wrote:
MinGW/GCC compiled files (.dll, .exe, ...) are ~2x larger than MSVC.
This is mostly a side effect of how various MinGW support libraries are linked (statically rather than dynamically). If you include the necessary DLLs with the MSVC executable, it should be pretty close to the same size.

Author:  Siavash [ 03.09.2008, 11:53 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

swiftcoder wrote:
Siavash wrote:
MinGW/GCC compiled files (.dll, .exe, ...) are ~2x larger than MSVC.
This is mostly a side effect of how various MinGW support libraries are linked (statically rather than dynamically). If you include the necessary DLLs with the MSVC executable, it should be pretty close to the same size.


Yes it's true and I'm 120% agree with you about that :wink:

UPX makes the compiled files more smaller [I know that 500K file size haven't any meaning in 300GB HDDs world] but this will result in faster memory loading, portable [flash drives] and immunizes the compiled file from resource hacking (and some of virus infections like the hell jeffo worm that blew my winxp and ~200MB downloaded apps last 5 month :twisted: now I'm using 7zip to store my files and immunize them from infections :idea: )

Author:  Sniper [ 03.09.2008, 17:56 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

UPX is a good cruncher. The idea of crunching executables are very old .. remember Amiga/C64 times back in 80s/90s.

The only problem with crunched files is that some virus scanners detect it as virus, only because it is crunched with upx, kkrunchy, crinkler or whatever..

Author:  Siavash [ 03.09.2008, 18:26 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

Sniper wrote:
UPX is a good cruncher. The idea of crunching executables are very old .. remember Amiga/C64 times back in 80s/90s.

The only problem with crunched files is that some virus scanners detect it as virus, only because it is crunched with upx, kkrunchy, crinkler or whatever..


Yes some (old) antiviruses have this problem, but new antiviruses such as ESET NOD32 has been solved this problem by using their new advanced scanning technologies such as Heuristic scannings and ...
It's about 3 month that I don't use any antivirus , antispyware or firewall because most of them without weekly updates are useless and they only consume system resources. Currently I defend myself using Windows Task Manager + msconfig + search + safemode against new viruses and infections :idea:

Author:  swiftcoder [ 04.09.2008, 13:27 ]
Post subject:  Re: Reducing MinGW/GCC and MSVC compiled files size

Siavash wrote:
Sniper wrote:
It's about 3 month that I don't use any antivirus , antispyware or firewall because most of them without weekly updates are useless and they only consume system resources. Currently I defend myself using Windows Task Manager + msconfig + search + safemode against new viruses and infections :idea:
That takes a lot of discipline ;)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/