[Cuis-dev] [ChangeSet] Performance improvements for Shout in Workspaces
Juan Vuletich
juan at jvuletich.org
Mon Nov 16 06:05:30 PST 2020
The attach is an implementation of an option in Workspaces window menu
to toggle betweeh full printIt and limited to 10k chars.
On 11/16/2020 6:33 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> 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 <mailto: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
> <http://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 <http://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 <mailto:Cuis-dev at lists.cuis.st>
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201116/5b70fbe9/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 4457-Workspace-fullPrintIt-option-JuanVuletich-2020Nov16-10h41m-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201116/5b70fbe9/attachment.ksh>
More information about the Cuis-dev
mailing list