<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Marcel,</div><div><br>On Feb 20, 2018, at 2:26 AM, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br><br></div><blockquote type="cite"><div><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
We have to consider all open projects:<div><br></div><div>Project allMorphicProjects do: [:project |</div><div> project world allMorphsDo: [:morph |</div><div> morph removeProperty: #dropShadow]].</div><div><br></div><div>Yet, there can be hidden morphs. If we want to ignore those, we can stick with only cleaning up top-level morphs, which are usually the system windows:</div><div><br></div><div><div>Project allMorphicProjects do: [:project |</div><div> project world submorphsDo: [:morph |</div><div> morph removeProperty: #dropShadow]].</div></div></div></div></blockquote><div><br></div>Surely we only need to scan all morphs in the current world. There is no point keeping drop shadows for other than the action be world so if should be easy to establish the invariant that there are only drop shadows in the current world and hence we can use Bob's approach of only visiting the morphs in the active world.<div><br></div><div>Remember that the drop shadows are all destroyed (or at least appear to be) when one does a save and quit. Bloating happens when, as I do, one repeatedly saves an image and one does not quit. Starting an image results in a system that only has drop shadows in the active world. So there is no need to establish the invariant by e.g. adding a package script, but if one wanted one could put the slow trawl through all morphs in a package script.</div><div><br></div><div>But you can speed up the trawl through all morphs by using</div><div><br></div><div> MorphExtension allInstancesDo:</div><div> [:morphExtension|</div><div> ...</div><div><br></div><div>since drop shadows are only held in <span style="background-color: rgba(255, 255, 255, 0);">MorphExtensions, and that should speed up the initial scan to void drop shadows to establish the invariant that there are no drop shadows in other than the current world.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Cheers!</span></div><div><div><br><blockquote type="cite"><div><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000"><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 20.02.2018 10:57:08 schrieb Bob Arning <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>>:</p>
<p><span style="font-family: Georgia">Probably good enough might be</span></p>
<p><span style="font-family: Georgia">World allMorphsDo: [:ea | ea removeProperty:
#dropShadow]</span></p>
<p><span style="font-family: Georgia">takes 0 ms for me</span><br>
</p>
<br>
<div class="moz-cite-prefix">On 2/20/18 2:46 AM, Marcel Taeumel
wrote:<br>
</div>
<blockquote type="cite" cite="mid:2ee7b631-cf14-401b-a121-78d21b7842d6@getmailbird.com">
<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000"> Hi Eliot,
<div><br>
</div>
<div>sure. Removing the potential drop shadow of all kinds of
morphs takes time:</div>
<div><br>
</div>
<div>
<div>Morph allSubInstancesDo: [:ea | <span style="font-size: 12pt;line-height: 1.5">ea removeProperty: #dropShadow].</span></div>
</div>
<div><span style="font-size: 12pt;line-height: 1.5"><br>
</span></div>
<div><span style="font-size: 12pt;line-height: 1.5">About 3
seconds here in a quite clean image.</span></div>
<div><span style="font-size: 12pt;line-height: 1.5"><br>
</span></div>
<div>
<div style="">SystemWindow allSubInstancesDo: [:ea | <span style="font-size: 12pt;line-height: 1.5">ea
removeProperty: #dropShadow].</span></div>
</div>
<div style=""><span style="font-size: 12pt;line-height: 1.5"><br>
</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5">Works
at 100 milliseconds.</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5"><br>
</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5">What
has the biggest effect in your image?</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5"><br>
</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5">Best,</span></div>
<div style=""><span style="font-size: 12pt;line-height: 1.5">Marcel</span></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px;
margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 20.02.2018
02:51:06 schrieb Eliot Miranda
<a class="moz-txt-link-rfc2396E" href="mailto:eliot.miranda@gmail.com"><eliot.miranda@gmail.com></a>:</p>
<div dir="ltr">Hi Marcel,
<div><br>
</div>
<div> I've finally worked out that the space overhead
here comes from the dropShadow cache system in Morphs (in
otherProperties in MorphExtensions). Would it be possible
to arrange to flush all drop shadows in the current
project when:</div>
<div>- exiting a project</div>
<div>- snapshotting</div>
<div>?</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 18, 2018 at 3:24 PM,
Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank" moz-do-not-send="true">eliot.miranda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi All,
<div><br>
</div>
<div> I've been experiencing image save slowdowns
recently and finally my work image reached 1.%Gb and
I thought I better take a look:</div>
<div><br>
</div>
<div>
<div>Sisyphus.Cog$ ls -lh SpurWork64.*
save/SpurWork64-*</div>
<div>-rw-r--r--@ 1 eliot staff 28M Jan 18 12:47
SpurWork64.changes</div>
<div>-rw-r--r--@ 1 eliot staff 1.6G Jan 18 12:48
SpurWork64.image</div>
<div>-rw-r--r--@ 1 eliot staff 28M Jan 18 12:03
save/SpurWork64-2018-01-18.<wbr>changes</div>
<div>-rw-r--r--@ 1 eliot staff 1.5G Jan 18 12:03
save/SpurWork64-2018-01-18.<wbr>image</div>
<div><br>
</div>
<div>I ran a space analysis and found that Bitmap
and ByteArray were the top two, so I looked for
large Bitmaps. I found three that fit this
criterion:</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div> Bitmap allInstances select: [:bm| bm size
>= 1000000 and: [bm ~~ Display bits]]</div>
</div>
<div><br>
</div>
<div>I inspected the three and did a chase pointers
on one of them. As I did that suddenly</div>
<div>a) the inspector on the Array became empty
(still an array but zero elements)</div>
<div>b) the progress bar for Downloading
FlexibleVocabularies-who.NN appeared</div>
<div><br>
</div>
<div>I interrupted this and did a very cursory stack
examination. Some object had not understood
isLiteral and from there what looked like an
attempt to turn this stub into a real object
caused FlexibleVocabularies-who.NN to start to
download.</div>
<div><br>
</div>
<div>I threw away the debugger, ran the GC and
suddenly all my free space was back. So now on
disc I have</div>
<div><br>
</div>
<div>
<div>Sisyphus.Cog$ ls -lh SpurWork64.*
save/SpurWork64-*</div>
<div>-rw-r--r--@ 1 eliot staff 28M Jan 18
15:17 SpurWork64.changes</div>
<div>-rw-r--r--@ 1 eliot staff 57M Jan 18
15:17 SpurWork64.image</div>
<div>-rw-r--r--@ 1 eliot staff 28M Jan 18
12:03 save/SpurWork64-2018-01-18.<wbr>changes</div>
<div>-rw-r--r--@ 1 eliot staff 1.5G Jan 18
12:03 save/SpurWork64-2018-01-18.<wbr>image</div>
</div>
<div><br>
</div>
<div>What is going on here? There seems to be a
very bad storage leak. Can we please discuss
this? This doesn't seem like healthy behaviour at
all :-)</div>
<div><br>
</div>
<div class="m_5716436936016961839gmail_signature">
<div dir="ltr">
<div><span style="font-size: 10pt;border-collapse: separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div><span style="font-size: 10pt;border-collapse: separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap=""></pre>
</blockquote>
<br>
</blockquote>
</div></div></blockquote><blockquote type="cite"><div><span></span><br></div></blockquote></div></div></body></html>