[Vm-dev] [Pharo-dev] Points, Free type fonts cache and memory leaks

tim Rowledge tim at rowledge.org
Tue Feb 14 18:17:51 UTC 2017


> On 14-02-2017, at 7:20 AM, Denis Kudriashov <dionisiydk at gmail.com> wrote:
> 
> 
> 2017-02-14 16:12 GMT+01:00 Ben Coman <btc at openinworld.com>:
> Even though these get cleared out, its still extra work for the GC.  Presumably most of the time the display size is identical to the last one, so I wonder if the existing screen size might be passed to the primitive to test and avoid creating a new new point if its the same.  Off the top of my head, something like this (untested)...  
> 
>   MorphicUIManager >> checkForNewDisplaySize
> 	Display hasScreenSizeChanged ifFalse: [^ Display].
> 	DisplayScreen startUp.
> 	World restoreMorphicDisplay.
> 
> I hope with SDL we will be able remove such loops. There is OSWindowResizeEvent which can be handled immediately when it's happened

Doesn’t need to have anything to do with SDL; any UI framework ought to be able to provide a suitable event, even if it has to be faked. X11 appears to use the ConfigureNotify event for example. It does require some care to get this stuff right, by the way; with Squeak wanting to be able to control the screen size a fullscreen status (including remembering the prior size and so on) as well as the UI wanting to control it… things can easily get into nasty loops. DAMHIKT.

In a Squeak image this display size test is done roughly 50/sec, which is not exactly going to cause a flood of ‘waste’ Points. I suspect there are much more worthy targets.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Several nuts over fruitcake minimum.




More information about the Vm-dev mailing list