[Cuis-dev] Shrinking Cuis image

Luciano Notarfrancesco luchiano at gmail.com
Fri Dec 16 06:38:41 PST 2022


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.

On Fri, 16 Dec 2022 at 20:55 Juan Vuletich <juan at cuis.st> wrote:

> 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.
>
>
> On 12/16/2022 2:10 AM, Luciano Notarfrancesco via Cuis-dev wrote:
>
> 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.
> 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.
>
> On Thu, 15 Dec 2022 at 19:52 Juan Vuletich via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Most likely it is TrueType fonts that are using a lot of memory.
>>
>> HTH,
>>
>> On 12/15/2022 8:12 AM, Hilaire Fernandes via Cuis-dev wrote:
>>
>> Another one to condense the change file, but you have to remove the
>> inform morph after:
>>
>>     Smalltalk condenseChanges.
>>     "Remove all morphs"
>>     self runningWorld doOneCycleNow.
>>     (UISupervisor ui submorphs reject: [:aMorph | aMorph is:
>> #TaskbarMorph]) do: [:each | each delete].
>>
>> --
>> GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
>>
>>
>>
>> --
>> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>>
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221216/1e8f443a/attachment.htm>


More information about the Cuis-dev mailing list