Thread: pgAdmin3.app size?

pgAdmin3.app size?

From
OpenMacNews
Date:
> Name: PgAdminIII
> Kind: Application
> Size: 246.3 MB on disk

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

i'm presuming that that's:

(a) normal/correct, and
(b) in part, due to:

   --enable-static
   --enable-debug

yes?

just a thought ... it would be nice (eventually) to be able to trim down such
an admin tool so as to fit 'comfortably' on a USB RAM dongle.

dunno (yet) if disabling debug + any optimizations will help.

for now, size makes no difference ... er ... but whatcha do with it ...

richard

Re: pgAdmin3.app size?

From
"Florian G. Pflug"
Date:
OpenMacNews wrote:
>> Name: PgAdminIII
>> Kind: Application
>> Size: 246.3 MB on disk
>
>
> 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 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....
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...

> just a thought ... it would be nice (eventually) to be able to trim down
> such an admin tool so as to fit 'comfortably' on a USB RAM dongle.
See above - under 20MB is easily archived.
If you omit the docs, you'll get below 10MB.

Greetings, Florian Pflug

Attachment

Re: pgAdmin3.app size?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of OpenMacNews
> Sent: 11 April 2005 17:28
> To: pgadmin-hackers
> Subject: [pgadmin-hackers] pgAdmin3.app size?
>
> > Name: PgAdminIII
> > Kind: Application
> > Size: 246.3 MB on disk
>
> 246 MB?  yikes!  that's big ...
>
> i'm presuming that that's:
>
> (a) normal/correct, and
> (b) in part, due to:
>
>    --enable-static
>    --enable-debug
>
> yes?

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).

> just a thought ... it would be nice (eventually) to be able
> to trim down such
> an admin tool so as to fit 'comfortably' on a USB RAM dongle.
>
> dunno (yet) if disabling debug + any optimizations will help.
>
> for now, size makes no difference ... er ... but whatcha do
> with it ...

Err, yes. Well, assuming you have a reasonably sized dongle anyway...

Regards, Dave.

Re: pgAdmin3.app size?

From
OpenMacNews
Date:
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

Re: pgAdmin3.app size?

From
"Florian G. Pflug"
Date:
OpenMacNews wrote:
> 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.
Ok, so it definitly is the missing "stripping phase" ;-)))

> 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?
If you have the time, it would be great. If you rebuild from scratch anyway,
please use the latest patch from www.phlo.org. The bundle is now named
pgAdmin3.app (to please Dave ;-) ), and I'd like this version of the patch
to be committed to cvs. I you manage to test it first, I'd be gratefull.

> what build scenario is typically being tested here?  wxwidgets & pgadmin
> both static, both shared, etc?
I compiled wxwindows as shared lib, since there were some wx-mac bugs until about
15 minutes ago, which I wanted to be able to debug... Some kind fellow
from wx-dev provided a fix today, and the other problem was fixed a few days ago.

I don't know of any other wx bugs influencing pgadmin, so I might switch back to
a static lib...

greetings, Florian Pflug

Attachment

Re: pgAdmin3.app size?

From
OpenMacNews
Date:
hi,

> Ok, so it definitly is the missing "stripping phase" ;-)))
>
>> 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?

> If you have the time, it would be great. If you rebuild from scratch anyway,
> please use the latest patch from www.phlo.org. The bundle is now named
> pgAdmin3.app (to please Dave ;-) ), and I'd like this version of the patch
> to be committed to cvs. I you manage to test it first, I'd be gratefull.

ok, i'll start from scratch on both wxwidgets & pgadmin3 ... good excuse to go
get a margarita, anyway.

>> what build scenario is typically being tested here?  wxwidgets & pgadmin
>> both static, both shared, etc?
> I compiled wxwindows as shared lib, since there were some wx-mac bugs until
> about
> 15 minutes ago, which I wanted to be able to debug... Some kind fellow
> from wx-dev provided a fix today, and the other problem was fixed a few days
> ago.
>
> I don't know of any other wx bugs influencing pgadmin, so I might switch back
> to
> a static lib...

ok.

so, i'll build both from HEAD, static, debug off, with your newset patch ...

and will report back when all's done.

cheers,

richard