<div dir="ltr">What exactly is the behavior in Pharo?<div><br></div><div>In a recent Squeak on Spur I don't see anything unusual. In my image there are 9 Object instances. Then I added the "Object basicNew" in #checkForNewScreenSize and the instance count of Object starts increasing rapidly until the next incremental GC, which happens about every 10 seconds, then the count drops and starts increasing again.</div><div><div><br></div><div>I verified it like this:</div><div><br></div><div>(UpdatingStringMorph on: Object selector: #instanceCount) openInHand<br></div></div><div><br></div><div>... which continuously shows the number of instances, and</div><div><br></div><div>(UpdatingStringMorph on: [Smalltalk vmParameterAt: 9] selector: #value) openInHand<br></div><div><br></div><div>... which shows the number of incremental GCs.</div><div><br></div><div>Is it possible that in your image there is so little garbage generated that no incremental GC is triggered for a long time? My image has dozens of windows and stepping morphs. I'd try to log vm param 9 along with your inst count.</div><div><br></div><div><br></div><div>- Bert -</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 2:58 PM, Pavel Krivanek <span dir="ltr"><<a href="mailto:pavel.krivanek@gmail.com" target="_blank">pavel.krivanek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Strange, in Pharo 3 it behaves the same way. So probably not directly Spur related.<div><br></div><div>-- Pavel<br><div class="gmail_extra"><br><div class="gmail_quote">2017-01-26 14:52 GMT+01:00 Clément Bera <span dir="ltr"><<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Is it the same behavior in Pharo 3 ? <div><br></div><div>Just wondering if this is a Spur issue or if it is non related to Spur. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 2:38 PM, Pavel Krivanek <span dir="ltr"><<a href="mailto:pavel.krivanek@gmail.com" target="_blank">pavel.krivanek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi,<div><br></div><div>in Pharo and in Squeak, if you try to print:</div><div><br></div><div>Point allInstances size.</div><div><br></div><div>several times, you will get fastly growing number of Point instances in most cases. But when you do:</div><div><br></div><div><font face="monospace, monospace">Smalltalk garbageCollect. Point allInstances size.</font><br></div><br>The number of instances is quite stable.<div><br></div><div>I realized that about every 5 milliseconds two new Point instances are created and not collected in reasonable time. I tried to find what points to them and I realized that nothing. That two instances contain display size so it was easy to find the place where these points are created. In Pharo it is in</div><div><br></div><div><font face="monospace, monospace">MorphicUIManager>>#checkForNew<wbr>DisplaySize</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span class="m_733696627428199776m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>"Check whether the screen size has changed and if so take appropriate actions"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span class="m_733696627428199776m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>Display extent = DisplayScreen actualScreenSize ifTrue: [^ Display].</font></div><div><font face="monospace, monospace"><span class="m_733696627428199776m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>DisplayScreen startUp.</font></div><div><font face="monospace, monospace"><span class="m_733696627428199776m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>World restoreMorphicDisplay.</font></div><div><br></div><div>As you can see in the code, the two point instances are only very temporary objects. And with some experiments I realized that that behavior is not Point specific (eg. some problem with the @ primitive). Because if you replace the code of the method with only Object basicNew, the growth of Object instances is similar. See the attached script.</div><div><br></div><div>pharo-ui Pharo st <a href="http://script2.st" target="_blank">script2.st</a><br></div><div><br></div><div>Cheers,<br></div><div>-- Pavel</div><div><br></div><div><br></div><div><br></div></div>
<br></blockquote></div><br></div>
<br></blockquote></div><br></div></div></div>
<br></blockquote></div><br></div>