Ruler slow down when printing the value

Bug #1836732 reported by hilaire
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dr. Geo
Fix Released
Medium
Unassigned

Bug Description

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

DrGeoSketch>>float:at:from:to:name:showValue:

It seems related to the message #rename:

 mobile rename: ...

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

Revision history for this message
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 )).
 value]]
   ifFalse: [[mobile mathItem abscissa * ( endValue - startValue) + startValue]]

Revision history for this message
hilaire (hilaire-fernandes) wrote :

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.