[Cuis-dev] Shrinking Cuis image

Juan Vuletich juan at cuis.st
Fri Dec 16 05:55:29 PST 2022


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 <mailto: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. Geo
>>     http://drgeo.eu
>>     http://blog.drgeo.eu
>
>
>     -- 
>     Juan Vuletich
>     cuis.st  <http://cuis.st>
>     github.com/jvuletich  <http://github.com/jvuletich>
>     researchgate.net/profile/Juan-Vuletich  <http://researchgate.net/profile/Juan-Vuletich>
>     independent.academia.edu/JuanVuletich  <http://independent.academia.edu/JuanVuletich>
>     patents.justia.com/inventor/juan-manuel-vuletich  <http://patents.justia.com/inventor/juan-manuel-vuletich>
>     linkedin.com/in/juan-vuletich-75611b3  <http://linkedin.com/in/juan-vuletich-75611b3>
>     twitter.com/JuanVuletich  <http://twitter.com/JuanVuletich>
>
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221216/69bca390/attachment.htm>


More information about the Cuis-dev mailing list