Recent

Author Topic: Why the size increase?  (Read 3580 times)

MadMike

  • New Member
  • *
  • Posts: 32
Why the size increase?
« on: July 31, 2014, 01:44:25 pm »
Just a quick question.

I have a small program written using Delphi (Turbo Delphi). The exe is about 560kb.

After importing into Lazarus, tidying up a few things, altering printing procedures so they work, etc. the size has ballooned to over 14MB.

Is this normal?

Mike

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Why the size increase?
« Reply #1 on: July 31, 2014, 02:08:44 pm »
It is normal, and you can make it less. See here.

MadMike

  • New Member
  • *
  • Posts: 32
Re: Why the size increase?
« Reply #2 on: July 31, 2014, 02:54:04 pm »
Thanks, interesting read.

A quick compile after doing this:

1. Project|Compiler Options|Code|Smart Linkable (-CX) -> Checked
2. Project|Compiler Options|Linking|Debugging| Uncheck all except Strip Symbols From Executable (-Xs)
3. Project|Compiler Options|Linking|Link Style|Link Smart (-XX) -> Checked

did not reduce the size, however.

I'll keep reading...

Mike
« Last Edit: July 31, 2014, 02:57:43 pm by MadMike »

MadMike

  • New Member
  • *
  • Posts: 32
Re: Why the size increase?
« Reply #3 on: July 31, 2014, 03:02:58 pm »
Ahah!

Unchecked 'Generate debugging info for GDB (slower / increases exe size)'

Now size is 1.6MB.

Are the instructions on the FAQ out of date?

All I have to do now is understand the other 90% of Lazarus I don't understand and I'll be set.

Thanks,

Mike

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Why the size increase?
« Reply #4 on: July 31, 2014, 03:47:16 pm »
Xs should strip what -g adds. If it doesn't there's probably a bug somewhere... It may well already be documented...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Why the size increase?
« Reply #5 on: July 31, 2014, 09:32:52 pm »
Depending on your Lazarus version, there was a bug -Xs doesn't work when -g (and its variants) exist. But it should no longer be the case with recent version.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Why the size increase?
« Reply #6 on: August 01, 2014, 01:25:07 am »
But it should no longer be the case with recent version.
To OP: that's why it's always useful to post Lazarus, Operating System version...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018