Image growing size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Image growing size

laura
Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance.


Best,
Laura
Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

philippeback

Try to open monticello and select any repo, right click and clear the package cache.

If you are using monticello that is.

Also close all windows, open a workspace and do the

10 timesRepeat: [ Smalltalk garbageCollect].

HTH
Phil

Le 3 févr. 2015 17:49, "Laura Risani" <[hidden email]> a écrit :
Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance.


Best,
Laura
Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Pharo Smalltalk Users mailing list
Do any of your (class/pool variable) singleton instances store data? add a #clearAll or #reset (mySingletonVar := nil) to the class side -- or whatever fits your app -- and do that before that #garbageCollect block. [In fact, put that in some XXXAdmin class]

Good Luck,
Cam

On Tue, Feb 3, 2015 at 12:31 PM, [hidden email] <[hidden email]> wrote:

Try to open monticello and select any repo, right click and clear the package cache.

If you are using monticello that is.

Also close all windows, open a workspace and do the

10 timesRepeat: [ Smalltalk garbageCollect].

HTH
Phil

Le 3 févr. 2015 17:49, "Laura Risani" <[hidden email]> a écrit :
Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance.


Best,
Laura

Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Clément Bera-4
In reply to this post by philippeback
Hello,

There could be many reasons why you would have such a big image.

The most common reason is the monticello metadata, as Phil said.

Another reason could be because some caches and objects that are flushed on snapshot, so if you looked at the image size at runtime and not the file size (for example, the Display object, which is huge, is not in the snapshot, same thing for the AST cache) it is bigger.

Another reason is that you may have kept persistent some data that refers to a huge graph of objects /  a lot of objects. In the past, it happened to me that I kept errors in a collection to be able to debug them after the program execution (debugging directly the error would crash the image because it was errors in critical processes), but those errors were referencing a huge graph of nodes and after several thousands errors the image was overflowing its 1Gb limit.

So what do you keep persistent in your application ? Does it refer to a lot of objects without you knowing it ?


2015-02-03 18:31 GMT+01:00 [hidden email] <[hidden email]>:

Try to open monticello and select any repo, right click and clear the package cache.

If you are using monticello that is.

Also close all windows, open a workspace and do the

10 timesRepeat: [ Smalltalk garbageCollect].

HTH
Phil

Le 3 févr. 2015 17:49, "Laura Risani" <[hidden email]> a écrit :

Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance.


Best,
Laura

Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Ben Coman
In reply to this post by laura


On Wed, Feb 4, 2015 at 12:49 AM, Laura Risani <[hidden email]> wrote:
Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep
 
an instance variable in some classes

Do you mean class-instance-variable? 

 
i wanted to have a unique instance.


Best,
Laura

Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

HilaireFernandes
In reply to this post by laura
Le 03/02/2015 17:49, Laura Risani a écrit :
> The official image i've downloaded weighted about 40 MB. Now its size
> is about 200 MB. What is the explanation? Is this normal or have i
> done something wrong?
>
You may want to try World menu>System>Do image clean up

Hilaire

--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

laura
I've tried, at some degree, all of your suggestions, but i failed to reduce the image size significantly. I'll keep trying, meantime i've started with a fresh image.  

Thank you for your answers.
Best,
Laura

On Wed, Feb 4, 2015 at 11:10 AM, Hilaire <[hidden email]> wrote:
Le 03/02/2015 17:49, Laura Risani a écrit :
> The official image i've downloaded weighted about 40 MB. Now its size
> is about 200 MB. What is the explanation? Is this normal or have i
> done something wrong?
>
You may want to try World menu>System>Do image clean up

Hilaire

--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu




Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

HilaireFernandes
Personally I never got a 200MB image size, you have very likely
persisted large collection of objects of your own in your image.

Le 06/02/2015 23:29, Laura Risani a écrit :

> I've tried, at some degree, all of your suggestions, but i failed to
> reduce the image size significantly. I'll keep trying, meantime i've
> started with a fresh image.  
>
> Thank you for your answers.
> Best,
> Laura
>
> On Wed, Feb 4, 2015 at 11:10 AM, Hilaire
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Le 03/02/2015 17:49, Laura Risani a écrit :
>     > The official image i've downloaded weighted about 40 MB. Now its size
>     > is about 200 MB. What is the explanation? Is this normal or have i
>     > done something wrong?
>     >
>     You may want to try World menu>System>Do image clean up
>
>     Hilaire
>
>     --
>     Dr. Geo - http://drgeo.eu
>     iStoa - http://istoa.drgeo.eu
>
>
>
>


--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Stephan Eggermont-3
In reply to this post by laura
You might want to inspect this to see if this gets you something
interesting.

(Object allSubclasses collect: [ :aClass |
        aClass -> aClass allInstances size])
        sort: [ :a :b | a value > b value ]

It takes some time to run, especially in a larger image.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Thierry Goubier
Hi,

a fairly long report on the image and memory hogs is :

SmalltalkImage current reportCPUandRAM

Writes files in the image folder containing all the information. Takes a while to run.

Thierry

2015-02-07 9:53 GMT+01:00 Stephan Eggermont <[hidden email]>:
You might want to inspect this to see if this gets you something interesting.

(Object allSubclasses collect: [ :aClass |
        aClass -> aClass allInstances size])
        sort: [ :a :b | a value > b value ]

It takes some time to run, especially in a larger image.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Trygve Reenskaug
I had this trouble with Squeak. It transpired that Squeak has a recycle bin! I changed a preference and all my junk objects disappeared.

On 07.02.2015 10:19, Thierry Goubier wrote:
Hi,

a fairly long report on the image and memory hogs is :

SmalltalkImage current reportCPUandRAM

Writes files in the image folder containing all the information. Takes a while to run.

Thierry

2015-02-07 9:53 GMT+01:00 Stephan Eggermont <[hidden email]>:
You might want to inspect this to see if this gets you something interesting.

(Object allSubclasses collect: [ :aClass |
        aClass -> aClass allInstances size])
        sort: [ :a :b | a value > b value ]

It takes some time to run, especially in a larger image.

Stephan




--

The essence of object orientation is that objects collaborate  to achieve a goal.
Trygve Reenskaug      
[hidden email]
Morgedalsvn. 5A       
http://folk.uio.no/trygver/
N-0378 Oslo             
http://fullOO.info
Norway                     Tel: (+47) 22 49 57 27

Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Sven Van Caekenberghe-2
In reply to this post by Thierry Goubier

> On 07 Feb 2015, at 10:19, Thierry Goubier <[hidden email]> wrote:
>
> Hi,
>
> a fairly long report on the image and memory hogs is :
>
> SmalltalkImage current reportCPUandRAM

Cool. I didn't know that one. Thanks.

> Writes files in the image folder containing all the information. Takes a while to run.
>
> Thierry
>
> 2015-02-07 9:53 GMT+01:00 Stephan Eggermont <[hidden email]>:
> You might want to inspect this to see if this gets you something interesting.
>
> (Object allSubclasses collect: [ :aClass |
>         aClass -> aClass allInstances size])
>         sort: [ :a :b | a value > b value ]
>
> It takes some time to run, especially in a larger image.
>
> Stephan
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

laura
Problemution (problem+solution) found!

I've tried 
clearing package cache, image cleanup -> size decreased a little.
unloading all my packages ->  size unchanged.

Yet i haven't thought as my doing about TilingWindowManager i've installed! It has an option for snapshooting worlds, it's possible i've been triggering it involuntarily with some shortcut i wasn't aware of, anyway if this was the case i get no visual notification when snapshooting (like the one you get when saving the image).

disabled TilingWindowManager -> size decreased about 200 MB, down to 20 MB.


Also the discussion brought up very interesting msg collaborations snippets and system features for future reference!

Best,
Laura

On Sat, Feb 7, 2015 at 7:32 AM, Sven Van Caekenberghe <[hidden email]> wrote:

> On 07 Feb 2015, at 10:19, Thierry Goubier <[hidden email]> wrote:
>
> Hi,
>
> a fairly long report on the image and memory hogs is :
>
> SmalltalkImage current reportCPUandRAM

Cool. I didn't know that one. Thanks.

> Writes files in the image folder containing all the information. Takes a while to run.
>
> Thierry
>
> 2015-02-07 9:53 GMT+01:00 Stephan Eggermont <[hidden email]>:
> You might want to inspect this to see if this gets you something interesting.
>
> (Object allSubclasses collect: [ :aClass |
>         aClass -> aClass allInstances size])
>         sort: [ :a :b | a value > b value ]
>
> It takes some time to run, especially in a larger image.
>
> Stephan
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Sven Van Caekenberghe-2

> On 07 Feb 2015, at 17:43, Laura Risani <[hidden email]> wrote:
>
> Problemution (problem+solution) found!
>
> I've tried
> clearing package cache, image cleanup -> size decreased a little.
> unloading all my packages ->  size unchanged.
>
> Yet i haven't thought as my doing about TilingWindowManager i've installed! It has an option for snapshooting worlds, it's possible i've been triggering it involuntarily with some shortcut i wasn't aware of, anyway if this was the case i get no visual notification when snapshooting (like the one you get when saving the image).
>
> disabled TilingWindowManager -> size decreased about 200 MB, down to 20 MB.

That sounds like an important discovery, there were memory complaints before, ...

> Also the discussion brought up very interesting msg collaborations snippets and system features for future reference!
>
> Best,
> Laura
>
> On Sat, Feb 7, 2015 at 7:32 AM, Sven Van Caekenberghe <[hidden email]> wrote:
>
> > On 07 Feb 2015, at 10:19, Thierry Goubier <[hidden email]> wrote:
> >
> > Hi,
> >
> > a fairly long report on the image and memory hogs is :
> >
> > SmalltalkImage current reportCPUandRAM
>
> Cool. I didn't know that one. Thanks.
>
> > Writes files in the image folder containing all the information. Takes a while to run.
> >
> > Thierry
> >
> > 2015-02-07 9:53 GMT+01:00 Stephan Eggermont <[hidden email]>:
> > You might want to inspect this to see if this gets you something interesting.
> >
> > (Object allSubclasses collect: [ :aClass |
> >         aClass -> aClass allInstances size])
> >         sort: [ :a :b | a value > b value ]
> >
> > It takes some time to run, especially in a larger image.
> >
> > Stephan
> >
> >
> >
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

philippeback
In reply to this post by Pharo Smalltalk Users mailing list

I am using TWM and yes it gobbles memory.

Disable/GC/Enable is indeed aomething do every once in a while.

No need for snapshots for this to occur.

A couple of Nautilus windows do the same.

Youcan close them all in TWM and still have them eat memory.

Phil

Le 13 mai 2015 01:50, "Cameron Sanders via Pharo-users" <[hidden email]> a écrit :


---------- Forwarded message ----------
From: Cameron Sanders <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Date: Tue, 3 Feb 2015 23:11:12 -0500
Subject: Re: [Pharo-users] Image growing size
Do any of your (class/pool variable) singleton instances store data? add a #clearAll or #reset (mySingletonVar := nil) to the class side -- or whatever fits your app -- and do that before that #garbageCollect block. [In fact, put that in some XXXAdmin class]

Good Luck,
Cam

On Tue, Feb 3, 2015 at 12:31 PM, [hidden email] <[hidden email]> wrote:

Try to open monticello and select any repo, right click and clear the package cache.

If you are using monticello that is.

Also close all windows, open a workspace and do the

10 timesRepeat: [ Smalltalk garbageCollect].

HTH
Phil

Le 3 févr. 2015 17:49, "Laura Risani" <[hidden email]> a écrit :
Hi all,

The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong?

I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance.


Best,
Laura


Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Sean P. DeNigris
Administrator
In reply to this post by laura
laura wrote
Also the discussion brought up very interesting msg collaborations snippets
and system features for future reference!
I compiled them at https://github.com/pharo-project/pharo-core/wiki/Memory-Hogs
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

laura
Nice!

On Wed, May 13, 2015 at 8:51 AM, Sean P. DeNigris <[hidden email]> wrote:
laura wrote
> Also the discussion brought up very interesting msg collaborations
> snippets
> and system features for future reference!

I compiled them at
https://github.com/pharo-project/pharo-core/wiki/Memory-Hogs



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Image-growing-size-tp4803428p4826162.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Image growing size

Peter Uhnák
As I have discovered recently I quite regularly have large images (500+ MB); the reason seems to be combination of memory leaks, Roassal (maybe Athens), GUI, and a LOT of saving while having all those things opened. But Image cleanup tends to shrink it back to tens of megabytes.

Personally I don't care about the size but saving the image progressively slows done as it gets bigger.

Peter

On Wed, May 13, 2015 at 4:27 PM, Laura Risani <[hidden email]> wrote:
Nice!

On Wed, May 13, 2015 at 8:51 AM, Sean P. DeNigris <[hidden email]> wrote:
laura wrote
> Also the discussion brought up very interesting msg collaborations
> snippets
> and system features for future reference!

I compiled them at
https://github.com/pharo-project/pharo-core/wiki/Memory-Hogs



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Image-growing-size-tp4803428p4826162.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.