95ms in revised Squeak CompositionScanner / 366ms Pharo MultiCcompositionScanner / 347ms TxTextOn the base that you compose once and display many, this is a Memory/CPU trading that would not have been a good idea the 70's (birth of CharacterScanner family), but is now fair.- this will later accelerate display, because no scanning is required at display time- TxText spend more time in composing layout because it records each and every TxSpanIntervalOK Igor,I loaded ConfigurationOfTxText and I understand what you say:
Even if that does not make much sense, composition (layout building) can be measured with this kind of mini bench:
| text |
text := Compiler evaluate: (FileSystem workingDirectory parent parent parent / 'text.st' ) readStream contentsOfEntireFile .
MessageTally spyOn: [[100 timesRepeat: [(Paragraph new)������� style: TextStyle default copy
������� compose: text
������� from: 1
������� in: ( 0@0 corner: 569@9999999)]] timeToRun ].
MessageTally spyOn: [ 100 timesRepeat: [| m |
��� m := TxTextMorph new.
��� m layoutStrategy: TxWrapTextStrategy new.
��� m extent: 569@9999999.
��� m newTextContents: text]]