Thread: PGAdmin4 2.1 OSX bloat

PGAdmin4 2.1 OSX bloat

From
iPeel
Date:
Hi,

Installing V2.1 on OSX I noticed the size of the app on disk is 620MB!

V2.0 is quite large at 420MB but a bloat of 200MB over one release is quite
large.

Is the increase justified or has something crept in?



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html


Re: PGAdmin4 2.1 OSX bloat

From
fahar
Date:
Screen_Shot_2018-02-22_at_9.png
<http://www.postgresql-archive.org/file/t340437/Screen_Shot_2018-02-22_at_9.png>  


The application size of pgAdmin4 is 184.5MB on MAC 10.13 machine and it's
not reproducible, can you please share the exact steps so we can find the
actual root-cause of this behavior.

Kind Regards,

Fahar Abbas




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html


Re: PGAdmin4 2.1 OSX bloat

From
Darren Duncan
Date:
On 2018-02-21 8:54 PM, fahar wrote:
> The application size of pgAdmin4 is 184.5MB on MAC 10.13 machine and it's
> not reproducible, can you please share the exact steps so we can find the
> actual root-cause of this behavior.

I completely verify what iPeel said.

A PgAdmin4 2.0 OSX is 403.4MB and version 2.1 is 620.1MB in size.

Reproduction is trivially easy.

1. Just go to https://www.postgresql.org/ftp/pgadmin/pgadmin4/v2.1/macos/ and 
download the disk image file pgadmin4-2.1.dmg whose COMPRESSED size is 234.1MB 
(223.3MiB).

2. Open the disk image file and select the application bundle "pgAdmin 4.app" 
and Get Info its size, which shows 621.1MB.

I'm using Mac OS 10.12 Sierra.

Perhaps the PgAdmin application proper is about 184MB as you said, in which case 
it may be the combined size of that plus shared libraries or runtimes included 
in the application bundle total the 600, but for any normal user the combined 
size of the .app is what matters, its what they are actually copying and taking 
up space.

If you think the .app is only 184.5MB, then I would ask where you got yours 
from, surely not the official url above.

-- Darren Duncan


Re: PGAdmin4 2.1 OSX bloat

From
Darren Duncan
Date:
As for where all that bloat is going, I took a minute of digging and found 
something interesting.

/Volumes/pgAdmin\ 4/pgAdmin\ 
4.app/Contents/Resources/web/pgadmin/static/js/generated/.cache/hard-source

This one, single, "invisible" .cache directory in the application bundle is 
about 300MB by itself, or half of the total .app size.

I suspect this is the most egregious thing, assuming that folder only is either 
needed at development or packaging time or can be generated by PgAdmin at runtime.

-- Darren Duncan

On 2018-02-21 9:23 PM, Darren Duncan wrote:
> On 2018-02-21 8:54 PM, fahar wrote:
>> The application size of pgAdmin4 is 184.5MB on MAC 10.13 machine and it's
>> not reproducible, can you please share the exact steps so we can find the
>> actual root-cause of this behavior.
> 
> I completely verify what iPeel said.
> 
> A PgAdmin4 2.0 OSX is 403.4MB and version 2.1 is 620.1MB in size.
> 
> Reproduction is trivially easy.
> 
> 1. Just go to https://www.postgresql.org/ftp/pgadmin/pgadmin4/v2.1/macos/ and 
> download the disk image file pgadmin4-2.1.dmg whose COMPRESSED size is 234.1MB 
> (223.3MiB).
> 
> 2. Open the disk image file and select the application bundle "pgAdmin 4.app" 
> and Get Info its size, which shows 621.1MB.
> 
> I'm using Mac OS 10.12 Sierra.
> 
> Perhaps the PgAdmin application proper is about 184MB as you said, in which case 
> it may be the combined size of that plus shared libraries or runtimes included 
> in the application bundle total the 600, but for any normal user the combined 
> size of the .app is what matters, its what they are actually copying and taking 
> up space.
> 
> If you think the .app is only 184.5MB, then I would ask where you got yours 
> from, surely not the official url above.
> 
> -- Darren Duncan
> 
> 



Re: PGAdmin4 2.1 OSX bloat

From
iPeel
Date:
Hi,

As per Darren's post that's the exact steps I reproduced, the same goes for
the download from the nag in the app when a new version is detected. I
suspected something when the copy of the app in the DMG to the Applications
folder took ages on an SSD.

<http://www.postgresql-archive.org/file/t351335/Screen_Shot_2018-02-22_at_06.png> 

As I posted yesterday, it seems that V2.0 suffered a similar issue albeit to
a lesser extent. The .cache folder in
Contents/Resources/web/pgadmin/static/js/generated/.cache/hard-source is
221.6MB compared to 293.5MB in v2.1. As the uncompressed difference is 200MB
there must be something else causing a big size increase between releases.

It seems some QT libs in /Frameworks are changed and the appearance of
QtWebEngineCore.framework versus QTWebKit.framework resulted in an increase
of 71MB. This probably stems form an adoption of a new QT release, so
something we'll probably have to suck up.






--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html


Re: PGAdmin4 2.1 OSX bloat

From
Khushboo Vashi
Date:


On Thu, Feb 22, 2018 at 11:01 AM, Darren Duncan <darren@darrenduncan.net> wrote:
As for where all that bloat is going, I took a minute of digging and found something interesting.

/Volumes/pgAdmin\ 4/pgAdmin\ 4.app/Contents/Resources/web/pgadmin/static/js/generated/.cache/hard-source

This one, single, "invisible" .cache directory in the application bundle is about 300MB by itself, or half of the total .app size.

I suspect this is the most egregious thing, assuming that folder only is either needed at development or packaging time or can be generated by PgAdmin at runtime.

 

The pgAdmin 4 uses webpack hardSourceWebpackPlugin which caches the optimised javascripts in the .cache directory, and those will be used from the .cache directory during rebundling of webpack module, so that only the changed files will be processed on the next build in the development environment, and rest of the files are being picked up from the cached directory which makes the rebundling fast. But this is only helpful in the development environment, so the patch to fix this already sent to the pgadmin-hackers (Patch:  https://www.postgresql.org/message-id/CAFOhELfmrfwqBf9dpYkJJOoKFdLi%2BictCEeBthdxBDNp_mqP-g%40mail.gmail.com).



-- Darren Duncan


On 2018-02-21 9:23 PM, Darren Duncan wrote:
On 2018-02-21 8:54 PM, fahar wrote:
The application size of pgAdmin4 is 184.5MB on MAC 10.13 machine and it's
not reproducible, can you please share the exact steps so we can find the
actual root-cause of this behavior.

I completely verify what iPeel said.

A PgAdmin4 2.0 OSX is 403.4MB and version 2.1 is 620.1MB in size.

Reproduction is trivially easy.

1. Just go to https://www.postgresql.org/ftp/pgadmin/pgadmin4/v2.1/macos/ and download the disk image file pgadmin4-2.1.dmg whose COMPRESSED size is 234.1MB (223.3MiB).

2. Open the disk image file and select the application bundle "pgAdmin 4.app" and Get Info its size, which shows 621.1MB.

I'm using Mac OS 10.12 Sierra.

Perhaps the PgAdmin application proper is about 184MB as you said, in which case it may be the combined size of that plus shared libraries or runtimes included in the application bundle total the 600, but for any normal user the combined size of the .app is what matters, its what they are actually copying and taking up space.

If you think the .app is only 184.5MB, then I would ask where you got yours from, surely not the official url above.

-- Darren Duncan





Re: PGAdmin4 2.1 OSX bloat

From
Darren Duncan
Date:
On 2018-02-22 2:10 AM, Khushboo Vashi wrote:
> On Thu, Feb 22, 2018 at 11:01 AM, Darren Duncan wrote:
> 
>     As for where all that bloat is going, I took a minute of digging and found
>     something interesting.
> 
>     /Volumes/pgAdmin\ 4/pgAdmin\
>     4.app/Contents/Resources/web/pgadmin/static/js/generated/.cache/hard-source
> 
>     This one, single, "invisible" .cache directory in the application bundle is
>     about 300MB by itself, or half of the total .app size.
> 
>     I suspect this is the most egregious thing, assuming that folder only is
>     either needed at development or packaging time or can be generated by
>     PgAdmin at runtime.
> 
> The pgAdmin 4 uses webpack hardSourceWebpackPlugin which caches the optimised 
> javascripts in the .cache directory, and those will be used from the .cache 
> directory during rebundling of webpack module, so that only the changed files 
> will be processed on the next build in the development environment, and rest of 
> the files are being picked up from the cached directory which makes the 
> rebundling fast. But this is only helpful in the development environment, so the 
> patch to fix this already sent to the pgadmin-hackers (Patch: 
> https://www.postgresql.org/message-id/CAFOhELfmrfwqBf9dpYkJJOoKFdLi%2BictCEeBthdxBDNp_mqP-g%40mail.gmail.com).

Thank you for that.

So I ultimately hope this will result in new DMGs etc being published in the 
downloads directory that apply this packaging change for all affected pgAdmin 
versions, and not just the next upcoming one, since the older versions are still 
made available.

-- Darren Duncan


Re: PGAdmin4 2.1 OSX bloat

From
Dave Page
Date:


On Thu, Feb 22, 2018 at 10:10 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Thu, Feb 22, 2018 at 11:01 AM, Darren Duncan <darren@darrenduncan.net> wrote:
As for where all that bloat is going, I took a minute of digging and found something interesting.

/Volumes/pgAdmin\ 4/pgAdmin\ 4.app/Contents/Resources/web/pgadmin/static/js/generated/.cache/hard-source

This one, single, "invisible" .cache directory in the application bundle is about 300MB by itself, or half of the total .app size.

I suspect this is the most egregious thing, assuming that folder only is either needed at development or packaging time or can be generated by PgAdmin at runtime.

 

The pgAdmin 4 uses webpack hardSourceWebpackPlugin which caches the optimised javascripts in the .cache directory, and those will be used from the .cache directory during rebundling of webpack module, so that only the changed files will be processed on the next build in the development environment, and rest of the files are being picked up from the cached directory which makes the rebundling fast. But this is only helpful in the development environment, so the patch to fix this already sent to the pgadmin-hackers (Patch:  https://www.postgresql.org/message-id/CAFOhELfmrfwqBf9dpYkJJOoKFdLi%2BictCEeBthdxBDNp_mqP-g%40mail.gmail.com).


I'll look at this, but as a sidenote, the basic problem was fixed in 7192a2b67502b2afbad9e88cd3fc4618e7e64da1 which removes the cache directory during package builds (if present).
 



-- Darren Duncan


On 2018-02-21 9:23 PM, Darren Duncan wrote:
On 2018-02-21 8:54 PM, fahar wrote:
The application size of pgAdmin4 is 184.5MB on MAC 10.13 machine and it's
not reproducible, can you please share the exact steps so we can find the
actual root-cause of this behavior.

I completely verify what iPeel said.

A PgAdmin4 2.0 OSX is 403.4MB and version 2.1 is 620.1MB in size.

Reproduction is trivially easy.

1. Just go to https://www.postgresql.org/ftp/pgadmin/pgadmin4/v2.1/macos/ and download the disk image file pgadmin4-2.1.dmg whose COMPRESSED size is 234.1MB (223.3MiB).

2. Open the disk image file and select the application bundle "pgAdmin 4.app" and Get Info its size, which shows 621.1MB.

I'm using Mac OS 10.12 Sierra.

Perhaps the PgAdmin application proper is about 184MB as you said, in which case it may be the combined size of that plus shared libraries or runtimes included in the application bundle total the 600, but for any normal user the combined size of the .app is what matters, its what they are actually copying and taking up space.

If you think the .app is only 184.5MB, then I would ask where you got yours from, surely not the official url above.

-- Darren Duncan








--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company