<div dir="auto">Yes, that’s what I thought too. I took a look at the glyph form arrays too, I set them all to nil to check but it seems they don’t use much memory because it didn’t make much of a difference in my image. But it’s ok, we shouldn’t hurry, as you said we need to understand the problem better first, and I’m not even sure there’s a problem.</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 16 Dec 2022 at 20:55 Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><u></u>

  
    
    
  
  <div bgcolor="#ffffff" text="#000000">
    Yes, we could do something like that. But each TTFontDefinition is
    "atomic": it has a big IntegerArray and a bigger Float32Array. Any
    attempt to use the font would load it back in memory. We'd need to
    understand better what is the problem we're trying to solve, to see
    if this would be a good solution.</div><div bgcolor="#ffffff" text="#000000"><br>
    <br>
    On 12/16/2022 2:10 AM, Luciano Notarfrancesco via Cuis-dev wrote:
    <blockquote type="cite">
      <div dir="auto">Juan, have you considered loading the fonts
        incrementally as they are needed instead of all at once? I don’t
        see an easy way to do it, but maybe you gave it some thought
        already.</div>
      <div dir="auto">Another option is to unload the font data to disk
        and load it as it’s needed. I did this before for a
        text-to-speech system that used a diphones database. I first
        loaded all in memory and then saved them on disk using image
        segments. Then whenever a diphone is needed I loaded it and
        referenced it weakly (like WeakArray with: diphone), so later if
        it is not used it can be automatically garbage collected.
        Loading from disk with image segments is very fast, it worked in
        real time with small memory footprint.</div>
      <div><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, 15 Dec 2022 at 19:52
            Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
            <div bgcolor="#ffffff" text="#000000"> Most likely it is
              TrueType fonts that are using a lot of memory.<br>
              <br>
              HTH,<br>
              <br>
              On 12/15/2022 8:12 AM, Hilaire Fernandes via Cuis-dev
              wrote:
              <blockquote type="cite">
                <p><font style="color:rgb(0,0,0)" size="4">Another
                    one to condense the change file, but you have to
                    remove the inform morph after:</font></p>
                <p><font style="color:rgb(0,0,0)" size="4">   
                    Smalltalk condenseChanges.<br>
                        "Remove all morphs"<br>
                        self runningWorld doOneCycleNow.<br>
                        (UISupervisor ui submorphs reject: [:aMorph |
                    aMorph is: #TaskbarMorph]) do: [:each | each
                    delete].</font><br>
                </p>
                <pre style="font-family:monospace" cols="72">-- 
GNU Dr. Geo
<a href="http://drgeo.eu" style="font-family:monospace" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" style="font-family:monospace" target="_blank">http://blog.drgeo.eu</a></pre>
              </blockquote>
              <br>
              <br>
              <pre style="font-family:monospace" cols="72">-- 
Juan Vuletich
<a href="http://cuis.st" style="font-family:monospace" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" style="font-family:monospace" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" style="font-family:monospace" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" style="font-family:monospace" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" style="font-family:monospace" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" style="font-family:monospace" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" style="font-family:monospace" target="_blank">twitter.com/JuanVuletich</a></pre>
            </div>
            -- <br>
            Cuis-dev mailing list<br>
            <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
            <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre cols="72" style="font-family:monospace">-- 
Juan Vuletich
<a href="http://cuis.st" target="_blank" style="font-family:monospace">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank" style="font-family:monospace">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank" style="font-family:monospace">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank" style="font-family:monospace">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank" style="font-family:monospace">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank" style="font-family:monospace">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank" style="font-family:monospace">twitter.com/JuanVuletich</a></pre>
  </div>

</blockquote></div></div>