[Cuis-dev] [ChangeSet] Performance improvements for Shout in Workspaces

Luciano Notarfrancesco luchiano at gmail.com
Mon Nov 16 01:33:59 PST 2020


Great! I’m afk for a couple of days, but I’ll test it as soon as I can.
This is one of those things that are slightly annoying but not enough to
make me go try to fix it myself, plus I’m unfamiliar with that part of
Cuis, so thanks a lot!

On Mon, 16 Nov 2020 at 7:06 AM, Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi Folks,
>
> It has recently brought to my attention that doing printIt in a Workspace
> of
>
> Array streamContents: [ :s | 5000 timesRepeat: [s nextPut: 100 atRandom
> @ 100 atRandom ]].
>
> takes several seconds, but if you disable Shout (Window menu, disable
> 'syntax highlighting') makes it instant. There are several reasons for
> this:
> - After doing text layout, the workspace text morph realizes contents
> large, and a scroll bar is required. This takes off some pixels at the
> right side, so there is less space for text. This requires doing text
> layout again.
> - Then, after doing shout, as some text might have become bold or
> italic, changing the font metrics, and possibly what text fits in a
> line, text layout is done again!
> - Due to a couple of bugs, text layout might be done even once or twice
> more!
>
> The numbered attachments make it way faster, besides simplifying and
> cleaning the code. Please test and review them.
>
> Additionally #printIt in attach printIt-limitedTo*.cs.st is an
> experiment that by limiting the printed result to 10,000 characters, it
> makes the example instantaneous even for an array a hundred of times
> larger. I think it is a good idea to include it, but if you see an use
> case for such large printStrings, please tell.
>
> Thanks,
>
> --
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201116/7d96c6f3/attachment.htm>


More information about the Cuis-dev mailing list