<div dir="auto">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!</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 16 Nov 2020 at 7:06 AM, Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Hi Folks,<br>
<br>
It has recently brought to my attention that doing printIt in a Workspace of<br>
<br>
Array streamContents: [ :s | 5000 timesRepeat: [s nextPut: 100 atRandom <br>
@ 100 atRandom ]].<br>
<br>
takes several seconds, but if you disable Shout (Window menu, disable <br>
'syntax highlighting') makes it instant. There are several reasons for this:<br>
- After doing text layout, the workspace text morph realizes contents <br>
large, and a scroll bar is required. This takes off some pixels at the <br>
right side, so there is less space for text. This requires doing text <br>
layout again.<br>
- Then, after doing shout, as some text might have become bold or <br>
italic, changing the font metrics, and possibly what text fits in a <br>
line, text layout is done again!<br>
- Due to a couple of bugs, text layout might be done even once or twice <br>
more!<br>
<br>
The numbered attachments make it way faster, besides simplifying and <br>
cleaning the code. Please test and review them.<br>
<br>
Additionally #printIt in attach printIt-limitedTo*.<a href="http://cs.st" rel="noreferrer" target="_blank">cs.st</a> is an <br>
experiment that by limiting the printed result to 10,000 characters, it <br>
makes the example instantaneous even for an array a hundred of times <br>
larger. I think it is a good idea to include it, but if you see an use <br>
case for such large printStrings, please tell.<br>
<br>
Thanks,<br>
<br>
-- <br>
Juan Vuletich<br>
<a href="http://www.cuis-smalltalk.org" rel="noreferrer" target="_blank">www.cuis-smalltalk.org</a><br>
<a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" rel="noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a><br>
<a href="https://github.com/jvuletich" rel="noreferrer" target="_blank">https://github.com/jvuletich</a><br>
<a href="https://www.linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a><br>
@JuanVuletich<br>
<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>