[Cuis-dev] Preliminary report on Vector Graphics Performance

Gerald Klix cuis.01 at klix.ch
Thu Oct 20 23:25:39 PDT 2022


Hi Juan,

Please, see below.

On 21.10.22 00:11, Juan Vuletich wrote:
> On 10/20/2022 5:52 PM, Gerald Klix via Cuis-dev wrote:
>> For an image without vector graphics
>> the time for the same measurement is about 235 ms.
>> 235ms, for what is arguably the worst case, is IHMO acceptable,
>> albeit perceptible (sorry, couldn't resist that pun).
>>
>>
>> Just my 0.00 CHF,
>>
>> Gerald
>>
>>
>> On 20.10.22 22:38, Gerald Klix via Cuis-dev wrote:
>>> Hi Juan, Hi all,
>>>
>>> When use my normal display size (4320 at 3840) with vector graphics loaded
>>> and place a browser window in each screen quadrant
>>> with the method Browser>>#classListIndex: selected.
>>>
>>> This expression
>>> -- snip --
>>> self runningWorld ifNotNil: [ :world |
>>>      world invalidateBounds.
>>>      [ world displayWorldSafely ] millisecondsToRun ].
>>> -- snap --
>>> yields something around 1510 (milliseconds),
>>> with ca. 5 ms deviation.
>>>
>>> A bit slow IHMO.
>>>
>>>
>>> HTH and Best Regards,
>>>
>>> Gerald
>>
> 
> Try again, with each of the possible Canvas class:
> 
> "
>      MorphicCanvas activeSubclass: BitBltCanvas
>      MorphicCanvas activeSubclass: HybridCanvas
>      MorphicCanvas activeSubclass: VectorCanvas
> "
>   self runningWorld ifNotNil: [ :world |
>        world invalidateBounds.
>        [ world displayWorldSafely ] millisecondsToRun ].
> 
> 
> Thanks,
> 

I ran the following snippet with all three canvases:

-- snip --
timings _ 1 to: 20 :: collect:  [ :count |
	self runningWorld ifNotNil: [ :world |
		world invalidateBounds.
		[ world displayWorldSafely ] millisecondsToRun"WithoutGC" ] ].
{ timings first. timings max. timings min. timings mean asFloat. timings 
allButFirst mean asFloat}
-- snap ---

Results are as follows:
BitBltCanvas:	#(294 294 213 220.35 216.47368421052633)
HybridCanvas:	#(351 351 279 285.95 282.5263157894737)
VectorCanvas:	#(1555 1624 1497 1509.6 1507.2105263157894)


HTH,

Gerald


More information about the Cuis-dev mailing list