[Pharo-dev] Fwd: Small text composition bench

Igor Stasenko siguctua at gmail.com
Fri Oct 11 08:36:11 EDT 2013


On 11 October 2013 07:34, Stéphane Ducasse <stephane.ducasse at inria.fr>wrote:

> Hi Igor
>
> it would be good to see how the new text model perform.
>
>
Thanks..
Rough equivalent of it in new text model would be:

=======
morph :=
(TxTextEditorMorph openInWindowWithString: '=Lorem
ipsum dolor sit
amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
in culpa qui officia deserunt mollit anim id est laborum."
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45
BC

=Lorem
ipsum dolor sit
amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
in culpa qui officia deserunt mollit anim id est laborum."
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45
BC

=Lorem
ipsum dolor sit
amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
in culpa qui officia deserunt mollit anim id est laborum."
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45
BC
') submorphs last
submorphs last.

layoutView := morph instVarNamed: #layoutViewMorph.

[100 timesRepeat: [ layoutView resetLayout ]] timeToRun

0:00:00:00.006

but that comparison don't have much sense, because the
layout & rendering is different.

First, because in reality, the layout is not calculated each time when view
is rendered,
but only when the view changed or text changed.
Second, the layout is calculated only for portion of text (big enough to
correctly display the text in view),
and thus, depending mostly just on view extent, in contrast to old model,
which depends mostly on text size itself.

The rendering uses precalculated layout and highly depends on what
font/resolution
etc is used...

So, for more fair comparison, i'd better compare the rendering speed,
because at the end it is
up (or down) to the "how fast you can deliver text on screen".


-- 
Best regards,
Igor Stasenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131011/a82dd5b8/attachment-0002.html>


More information about the Pharo-dev mailing list