Re: pgAdmin3.app size? - Mailing list pgadmin-hackers

From OpenMacNews
Subject Re: pgAdmin3.app size?
Date
Msg-id DAF925EDBB8E8B188415911C@tiedgar
Whole thread Raw
In response to Re: pgAdmin3.app size?  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: pgAdmin3.app size?
List pgadmin-hackers
hi,

>> 246 MB?  yikes!  that's big ...

> Hm... my debug build are usually that large,
> but I have wx built as shared lib, and those
> libs are therefore copied into the bundle (by complete-bundle.sh),
> to make it self-contained....

for reference, my wxWidgets was built statically as:

    ../configure \
    --prefix=/usr/local/wxWidgets-cvs \
    --with-mac \
    --disable-shared \
    --enable-debug \
    --enable-unicode \
    --with-regex

> For a non-debug, non-shared wx build I get the following
> output from "du -s -h *" for PgAdminIII.app/Contents
>    0B    Frameworks
> 4.0K    Info.plist
> 7.4M    MacOS
>   48K    Resources
>   10M    SharedSupport
>
> The whole bundle is 18MB
>
> Could you try to run "strip"
> on the executable inside the bundle, and see if it reduces
> the size? Maybe the stripping step is for some reason left on
> while installing....

let's see what's going on ...

right after a clean build/install of pgadmin3 w/:

    ./configure \
    --enable-appbundle \
    --enable-static \
    --enable-debug \
    --with-wx=/usr/local/wxWidgets-cvs \
    --with-wx-config=wx-config \
    --with-pgsql=/usr/local/pgsql \
    --with-pgsql-include=/usr/local/pgsql/include

../PgAdminIII.app/Contents % du -s -h *
    3.2M    Frameworks
    4.0K    Info.plist
    233M    MacOS
     48K    Resources
     10M    SharedSupport

../PgAdminIII.app/Contents/MacOS  % ls -al *
    -rwxr-xr-x  1 root wheel 244080280 Apr 11 08:54 PgAdminIII

../PgAdminIII.app/Contents/MacOS % strip PgAdminIII

../PgAdminIII.app/Contents/MacOS  % ls -al *
    -rwxr-xr-x  1 root wheel 9766288 Apr 11 14:41 PgAdminIII

and, just for completeness

../PgAdminIII.app/Contents % du -s -h *
    3.2M    Frameworks
    4.0K    Info.plist
    9.3M    MacOS
     48K    Resources
     10M    SharedSupport

hmmm ... much better.

AND, the .app still launches from Finder nicely.

> The .app bundle I analyzed above is quite old, and I remeber that
> I stripped it manually - but IIRC I fixed this, and it should
> strip while installing now...

hmmm ... unclear, then.

> Probably - though 246MB is pretty big!! On slackware linux it's just
> under 47MB. You could try stripping it if OSX has a 'strip' program. On
> slack that reduces the executable to about 10MB (strip removes the debug
> symbols in case you weren't aware).

now i am. thx!

####################
## QUESTION(s)
#

stripping would/should only occur then in a 'disable-debug' mode, correct? or
am i misunderstanding?

is it worthwhile to y'all for me to re-build wxwidgets AND pgadmin w/ debug OFF
and see what happens?

what build scenario is typically being tested here?  wxwidgets & pgadmin both
static, both shared, etc?

> Yeah - the original at that :-)

! =)

> Err, yes.
> Moving swiftly on I'll leave the rest for someone who actually
> has a Mac ...

unappreciated in my own time ...

(Dave -- I'll leave you off subsequent cc: on Mac stuff ...)

thanks!

richard

pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: [wx-dev] Re: OSX Status / Old friend font inheritance...
Next
From: "Florian G. Pflug"
Date:
Subject: Re: pgAdmin3.app size?