Ruler slow down when printing the value

Bug #1836732 reported by hilaire on 2019-07-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dr. Geo II

Bug Description

When showValue argument is true, the block returned by method bellow updates slowly.


It seems related to the message #rename:

 mobile rename: ...

Same issue likely occurs with integer:at:from:to:name:showValue: method.

hilaire (hilaire-fernandes) wrote :

Modification as bellow, at the end improve a bit the performances:

^ isValueDisplay
   ifTrue: [[|value |
 value := mobile mathItem abscissa * ( endValue - startValue) + startValue.
 mobile costume textMorph privateSetContents: (name, ' = ', (value printShowingDecimalPlaces: 2 )).
   ifFalse: [[mobile mathItem abscissa * ( endValue - startValue) + startValue]]

hilaire (hilaire-fernandes) wrote :

Message #contentsClipped: in place of #privateSetContents: is more appropriate.

hilaire (hilaire-fernandes) wrote :

Preliminary analysis with MessageTally shows that replacing with message #contentsClipped: gives a x5 improvement in time of execution.

Changed in drgeo:
status: New → In Progress
Changed in drgeo:
milestone: 19.06 → 19.09
Changed in drgeo:
status: In Progress → Fix Committed
Changed in drgeo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers