* * *

Author Topic: to optimize big EXE file.  (Read 3012 times)

User137

  • Hero Member
  • *****
  • Posts: 503
Re: to optimize big EXE file.
« Reply #15 on: January 24, 2012, 12:46:25 am »
Where is Linux, Mac OS X, Android? Ops ... it doesnt run on them =)

Well, Lazarus applications run on those, so we have more features = more code = more binary size.
Actually, .exe files do not run on Linux unless that's with virtual machine like Wine. Application should always be compiled separately for each system. Multiplatform code is propably in big parts {$IFDEF} sections which only compile code for wanted operating system, others aren't included in the executable.

Martin_fr

  • Hero Member
  • *****
  • Posts: 1218
Re: to optimize big EXE file.
« Reply #16 on: January 24, 2012, 01:03:55 am »
Where is Linux, Mac OS X, Android? Ops ... it doesnt run on them =)

Well, Lazarus applications run on those, so we have more features = more code = more binary size.
Actually, .exe files do not run on Linux unless that's with virtual machine like Wine. Application should always be compiled separately for each system. Multiplatform code is propably in big parts {$IFDEF} sections which only compile code for wanted operating system, others aren't included in the executable.
Actually not corrert either.

Sure there are big parts of code that are only used for one platform each.

But there is lots of shared code that is for all platforms, and that need to be able to link to any of those per-platform sections.
Writing all that highly optimized (with ifdef or other means) would result in a maintenance hell.

Troodon

  • Sr. Member
  • ****
  • Posts: 485
Re: to optimize big EXE file.
« Reply #17 on: January 24, 2012, 02:25:38 am »
A 100MB microsoft .NET download is nothing these days. It's fast for me to download 100MB .NET runtime.. takes only a few seconds. And on my hard drive, 2TB or whatever, who cares about a 100mb .NET runtime? And also, computers are so fast, 3GHz, so the slowness of .NET or Java is irrelevant today due to Moore's Law!
End Sarcasm.

You are misinformed, my friend. I have to admit, I used to think like you. The Microsoft .Net 4.0 Frameword 4 Client is a 40 MB download. To my big surprise, C#.Net code actually runs faster than some native code that uses the same algorithm (ok, not the same data types, but still). In my experience a GUI Java application is still slower than native code but a C#.Net application is only slower to start (1-2 s instead of ~0.5 s). Besides, who runs Windows 7, which comes with .Net 3.5, and really thinks that getting the .Net 4.0 update is an issue? What .Net does not have and FreePascal does is the magic "write once, compile anywhere", with the compiler for "anywhere" provided free of charge. Trade-offs are in order, of course, but wow! this is a sort of Holy Grail of application development.
« Last Edit: January 24, 2012, 02:49:23 am by Troodon »
Lazarus/FPC on Linux

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1182
Re: to optimize big EXE file.
« Reply #18 on: January 24, 2012, 10:55:42 am »

You are misinformed, my friend. I have to admit, I used to think like you. The Microsoft .Net 4.0 Frameword 4 Client is a 40 MB download. To my big surprise, C#.Net code actually runs faster than some native code that uses the same algorithm (ok, not the same data types, but still).

And when crafted to avoid unnecessary GC activity by using native types etc. At least from what I saw from it that most benchmarked C# has a different style than one the average C# business programmer produces. The same as with Java btw.
 
Of course that also applies to FPC a bit (if you look at e.g. the FPC entries in the shootout), but I have the feeling that for C#/Java that is a near complete style change, while in Pascal and Delphi that effect is way less pronounced.

TurboRascal

  • Sr. Member
  • ****
  • Posts: 457
  • "Good sysadmin. Bad programmer."™
Re: to optimize big EXE file.
« Reply #19 on: January 24, 2012, 10:03:39 pm »
Writing all that highly optimized (with ifdef or other means) would result in a maintenance hell.

However, it often pays off to optimize code sections for the most used platform with that program ;) Then you have two bonuses to offer - a fast and quite competitive application on the dominant platform, and one which also runs on several other platforms.
Regards, Arny the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

delphiturk

  • New member
  • *
  • Posts: 6
Re: to optimize big EXE file.
« Reply #20 on: January 26, 2012, 10:24:23 am »
exe files, just how big I am for the Windows platform to optimize the response have developed a middleware. This is not good until the expansion of the matter. my friends who want to install software, use Windows systems. UPX.EXE with this software, install it on your host software.

my software is BINOptimizer :
http://www.delphiwise.com/binoptimizer/binoptimizer-setup.exe
« Last Edit: January 26, 2012, 12:04:41 pm by delphiturk »

delphiturk

  • New member
  • *
  • Posts: 6
Re: to optimize big EXE file.
« Reply #21 on: April 03, 2012, 10:00:34 am »
fix to bug in binoptimizer. If you need it, you can download new version from

http://www.delphiwise.com/binoptimizer/binoptimizer-setup.exe.

thanks for all.  :)
« Last Edit: April 03, 2012, 10:05:10 am by delphiturk »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads