[Cuis-dev] StyledTextEditor uses RunNotArray instead of RunArray
Juan Vuletich
juan at cuis.st
Sun Sep 17 16:59:20 PDT 2023
On 9/17/2023 11:06 AM, Bernhard Pieber via Cuis-dev wrote:
> Hi Juan,
>
> If I open a StyledTextEditor using StyledTextEditor open it uses a
> RunNotArray instead of a RunArray for its text like the
> SmalltalkEditor but unlike the TextEditor.
>
> The way SUnit test setup works it mostly uses a RunArray.
>
> Is this intentional, or would it better to use a RunArray?
>
> Cheers,
> Bernhard
>
>
Hi Bernhard,
The original implementation of Text from Smalltalk-80 uses RunArray
only. RunArray is a space optimization, as usually the same text
attributes are used by many consecutive characters. But it is expensive
in time, and I found it to slow down significantly the styling of long
Smalltalk methods. Hence, #optimizedForMutationSpeed and RunNotArray.
Any code using Text should work the same using any of them (except for
the speed / space tradeoff).
What problem are you seeing with RunNotArray? How can I reproduce it?
Thanks,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230917/49740cb1/attachment.htm>
More information about the Cuis-dev
mailing list