<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font face="Georgia">If...</font></p>
    <p><font face="Georgia">- SystemWindows are holding lots of drop
        shadows</font></p>
    <p><font face="Georgia">- the shadow is only shown for the frontmost
        window</font></p>
    <p><font face="Georgia">- recreating the shadow only takes around
        20ms</font></p>
    <p><font face="Georgia">Then SystemWindow>>#passivate seems
        like a nice place to keep things tidy. Works fine for me.</font><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2/20/18 11:21 AM, Marcel Taeumel
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:f9f32668-682d-49f9-81dc-43ace9afdfd2@getmailbird.com">
      <div id="__MailbirdStyleContent" style="font-size:
        12pt;font-family: calibri;color: #000000"> Hi Eliot,
        <div><br>
        </div>
        <div>okay. I added the clean-up to project switching and
          save-and/or-quit. All changes are in MorphicProject.
          See Morphic-mt.1397.</div>
        <div><br>
        </div>
        <div>Best,</div>
        <div>Marcel</div>
        <div><br>
        </div>
        <blockquote class="history_container" type="cite"
          style="border-left-style: solid;border-width: 1px;margin-top:
          20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
          <p style="color: #AAAAAA; margin-top: 10px;">Am 20.02.2018
            14:14:01 schrieb Eliot Miranda
            <a class="moz-txt-link-rfc2396E" href="mailto:eliot.miranda@gmail.com"><eliot.miranda@gmail.com></a>:</p>
          <div>Hi Marcel,<br>
            <br>
          </div>
          <div><br>
            On Feb 20, 2018, at 5:00 AM, Marcel Taeumel <<a
              href="mailto:marcel.taeumel@hpi.de" moz-do-not-send="true">marcel.taeumel@hpi.de</a>>
            wrote:<br>
            <br>
          </div>
          <blockquote type="cite" style="min-width: 500px">
            <div>
              <div id="__MailbirdStyleContent" style="font-size:
                12pt;font-family: calibri;color: #000000"> Hmm... I do
                not see value in cleaning up projects (to free memory)
                when the user just switches between them back and forth.
                Especially in the light of worlds-in-worlds or
                background projects, this seems like an unreasonable
                path to follow. We should not make too much assumptions
                about application code or user needs at this point.
                There could always be a "Oh, please render that
                background project into this file. Oh, why is it so slow
                at the moment..."</div>
            </div>
          </blockquote>
          <div><br>
          </div>
          Well one might want to make the drop shadow caches responsive
          to some overall memory budget because, as I've observed, the
          overhead of the drop shadows can be many megabytes.  I saw an
          overhead that approached 1Gb!!
          <div><br>
            <blockquote type="cite" style="min-width: 500px">
              <div id="__MailbirdStyleContent" style="font-size:
                12pt;font-family: calibri;color: #000000">
                <div><span style="font-size: 12pt">Cleaning up resources
                    for save-and-quit, however, seems reasonable because
                    it is at the environment's boundary and not some
                    arbitrary in-image boundary.</span></div>
                <div><br>
                </div>
                <div>Best,</div>
                <div>Marcel</div>
                <blockquote class="history_container" type="cite"
                  style="border-left-style: solid;border-width:
                  1px;margin-top: 20px;margin-left: 0px;padding-left:
                  10px;min-width: 500px">
                  <p style="color: #AAAAAA; margin-top: 10px;">Am
                    20.02.2018 13:58:38 schrieb David T. Lewis <<a
                      href="mailto:lewis@mail.msen.com"
                      moz-do-not-send="true">lewis@mail.msen.com</a>>:</p>
                  This might also justify adding one new method to
                  Project:<br>
                  <br>
                  Project>>cleanUpForExit<br>
                  <br>
                  Default implementation would be do nothing, and for
                  MorphicProject it<br>
                  would clean up the drop morphs. This would be called
                  from #finalExitActions:<br>
                  for ongoing cleanup, and when saving the image you
                  would do this:<br>
                  <br>
                  Project current cleanupForExit<br>
                  <br>
                  Dave<br>
                  <br>
                  <br>
                  On Tue, Feb 20, 2018 at 07:50:57AM -0500, David T.
                  Lewis wrote:<br>
                  > To handle all of the morphic projects, it would
                  be better to do the<br>
                  > cleanup when exiting the projects:<br>
                  > <br>
                  > MorphicProject>>finalExitActions:
                  enteringProject<br>
                  > world allMorphsDo: [:ea | ea removeProperty:
                  #dropShadow].<br>
                  > ...<br>
                  > <br>
                  > That will leave only the current project to worry
                  about when saving<br>
                  > the image. Of course, you do not want to to cleam
                  up the morphs if<br>
                  > the current world is a ControlManager, so it
                  might look something<br>
                  > like this:<br>
                  > <br>
                  > | world |<br>
                  > (world := Project current world) isMorph<br>
                  > ifTrue: [world allMorphsDo: [:ea | ea
                  removeProperty: #dropShadow]]<br>
                  > <br>
                  > Dave<br>
                  > <br>
                  > On Tue, Feb 20, 2018 at 11:26:19AM +0100, Marcel
                  Taeumel wrote:<br>
                  > > We have to consider all open projects:<br>
                  > > <br>
                  > > Project allMorphicProjects do: [:project |<br>
                  > > ?? ??project world allMorphsDo: [:morph |<br>
                  > > ?? ?? ?? morph removeProperty:
                  #dropShadow]].<br>
                  > > <br>
                  > > 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:<br>
                  > > <br>
                  > > Project allMorphicProjects do: [:project |<br>
                  > > ?? ??project world submorphsDo: [:morph |<br>
                  > > ?? ?? ?? morph removeProperty:
                  #dropShadow]].<br>
                  > > <br>
                  > > Best,<br>
                  > > Marcel<br>
                  > > Am 20.02.2018 10:57:08 schrieb Bob Arning <arning315@comcast.net>:<br>
                    > > Probably good enough might be<br>
                    > > World allMorphsDo: [:ea | ea
                    removeProperty: #dropShadow]<br>
                    > > takes 0 ms for me<br>
                    > > <br>
                    > > <br>
                    > > On 2/20/18 2:46 AM, Marcel Taeumel wrote:<br>
                    > > <br>
                    > > Hi Eliot,<br>
                    > > <br>
                    > > sure. Removing the potential drop shadow
                    of all kinds of morphs takes time:<br>
                    > > <br>
                    > > Morph allSubInstancesDo: [:ea |??ea
                    removeProperty: #dropShadow].<br>
                    > > <br>
                    > > About 3 seconds here in a quite clean
                    image.<br>
                    > > <br>
                    > > SystemWindow allSubInstancesDo: [:ea |??ea
                    removeProperty: #dropShadow].<br>
                    > > <br>
                    > > Works at 100 milliseconds.<br>
                    > > <br>
                    > > What has the biggest effect in your image?<br>
                    > > <br>
                    > > Best,<br>
                    > > Marcel<br>
                    > > Am 20.02.2018 02:51:06 schrieb Eliot
                    Miranda <eliot.miranda@gmail.com> [<a
                        href="mailto:eliot.miranda@gmail.com"
                        moz-do-not-send="true">mailto:eliot.miranda@gmail.com</a>]:<br>
                      > > Hi Marcel,<br>
                      > > <br>
                      > > ?? ?? 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:<br>
                      > > - exiting a project<br>
                      > > - snapshotting<br>
                      > > ?<br>
                      > > <br>
                      > > On Thu, Jan 18, 2018 at 3:24 PM, Eliot
                      Miranda <eliot.miranda@gmail.com
                        [mailto:eliot.miranda@gmail.com]=""> wrote:<br>
                        > > <br>
                        > > Hi All,<br>
                        > > <br>
                        > > ?? ?? I've been experiencing image
                        save slowdowns recently and finally my work
                        image reached 1.%Gb and I thought I better take
                        a look:<br>
                        > > <br>
                        > > Sisyphus.Cog$ ls -lh SpurWork64.*
                        save/SpurWork64-*<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? ??28M
                        Jan 18 12:47 SpurWork64.changes<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? 1.6G
                        Jan 18 12:48 SpurWork64.image<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? ??28M
                        Jan 18 12:03 save/SpurWork64-2018-01-18.changes<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? 1.5G
                        Jan 18 12:03 save/SpurWork64-2018-01-18.image<br>
                        > > <br>
                        > > 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:<br>
                        > > <br>
                        > > <br>
                        > > ?? ?? Bitmap allInstances select:
                        [:bm| bm size >= 1000000 and: [bm ~~ Display
                        bits]]<br>
                        > > <br>
                        > > I inspected the three and did a chase
                        pointers on one of them.?? As I did that
                        suddenly<br>
                        > > a) the inspector on the Array became
                        empty (still an array but zero elements)<br>
                        > > b) the progress bar for Downloading
                        FlexibleVocabularies-who.NN appeared<br>
                        > > <br>
                        > > 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.<br>
                        > > <br>
                        > > I threw away the debugger, ran the GC
                        and suddenly all my free space was back.?? So
                        now on disc I have<br>
                        > > <br>
                        > > Sisyphus.Cog$ ls -lh SpurWork64.*
                        save/SpurWork64-*<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? ??28M
                        Jan 18 15:17 SpurWork64.changes<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? ??57M
                        Jan 18 15:17 SpurWork64.image<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? ??28M
                        Jan 18 12:03 save/SpurWork64-2018-01-18.changes<br>
                        > > -rw-r--r--@ 1 eliot ??staff ?? 1.5G
                        Jan 18 12:03 save/SpurWork64-2018-01-18.image<br>
                        > > <br>
                        > > 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 :-)<br>
                        > > <br>
                        > > _,,,^..^,,,_<br>
                        > > <br>
                        > > best,??Eliot<br>
                        > > <br>
                        > > <br>
                        > > <br>
                        > > --<br>
                        > > <br>
                        > > _,,,^..^,,,_<br>
                        > > <br>
                        > > best,??Eliot<br>
                        > > <br>
                        > > <br>
                        > <br>
                        > > <br>
                        > <br>
                        > <br>
                        <br>
                      </eliot.miranda@gmail.com></eliot.miranda@gmail.com></arning315@comcast.net>
                </blockquote>
              </div>
            </blockquote>
            <blockquote type="cite">
              <div><span></span><br>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>