[squeak-dev] Dead primitive 103 makes scrolling truetype fonts very, very slow. Let's get rid of it

Marcel Taeumel marcel.taeumel at hpi.de
Thu Feb 17 11:00:40 UTC 2022

Also: The use of linked fonts (i.e. the TTCFont with a TTFontDescription) is currently rather slow regarding #hasGlyphOf:. I am working on it.

Am 17.02.2022 11:59:56 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Also: Please increase your Glyph cache first before making any experiments. See preference TTCFont glyphCacheSize. The interference between cache invalidation and you removing that primitive might be leading to wrong conclusions... :-)

Am 17.02.2022 11:58:07 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Tony --

I will look into this. The primitive is not dead for me... Fallback code seems a little bit slower...

> why is it re-layouting when I just change the TransformMorph's offset??

It is not. The CompositionScanner does the layouting. The DisplayScanner does the display. Both are of superclass "CharacterScanner". Both need that primitive. I suppose.

I will check is along with my current work on TrueType fonts and related caches.

Am 17.02.2022 10:07:17 schrieb Tony Garnock-Jones <tonyg at leastfixedpoint.com>:
Hi all,

Commenting out "" in
immediately and dramatically improves the performance of scrolling
anything truetype-font-ish on my very slow arm64 cellphone.

It's still not *fast* (why is it re-layouting when I just change the
TransformMorph's offset??) but it's faster than it was before, which was
"lock up the entire UI for ten seconds while thinking about failing
primitive 103"-speed.

Interestingly, fast x86_64 machines aren't immune either! Running a
tally in the same image on my x86_64 pc with a modern VM, and doing the
same scrolly thing, showed primitives to be taking a significant chunk
of time. Commenting out "" there immediately eliminated a
lot of wasted CPU usage, though the machine is so fast it's not easy to
notice the improvement at squishy meatbody sensory refresh rates.

So, should I commit a change that comments out "" for
good? I don't see a downside! Is there one?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220217/36ad1b93/attachment.html>

More information about the Squeak-dev mailing list