applying the method "Form>>rotateBy:" several times, to the same
form, the system slows down dramatically, even imposing a 0° rotation.
Below you can find a code snippet, to be run on the playground:
aForm:= ImageReadWriter formFromFileNamed: 'pharo.png'.
10 timesRepeat: [ aForm := aForm rotateBy:90 ].
Increasing the number of repetitions the delay get worse.
Does someone else get the same issue?
Is there something wrong on my code, or in the way I'm using the method?
The test has been launched in a Pharo 6.0 image, Latest update: #60499,
under Linux 64bit.
For this question I opened the FogBugz case n°20216
2017-07-04 23:54 GMT+02:00 Matteo via Pharo-users <[hidden email]>:
thanks for this contribution.
It is good that you found out the reason for the slowing down (repeatly creating a bigger form is of course not good).
I looked at your fix, it seems to work but both new methods are nearly identically, maybe it would be better to create another method for the common parts.
And I saw that there is another method
rotateBy: direction centerAt: aPoint
with direction could be either #left or #right and it will rotate cw/ccw by 90 degree
would this be useable for your use case?
On 10/07/17 21:54, Nicolai Hess wrote:
you're right: my methods "rotateByQuarterCCW" and "rotateByQuarterCW" are redundant.
The method "rotateBy: direction centerAt: aPoint" does the same thing.
Sorry for the trouble, but I got misled be the selectors:
that works differently than "rotateBy:centerAt:".
What should I do with the fogbugz n° 20216?
In reply to this post by Nicolai Hess-3-2
2017-07-11 20:59 GMT+02:00 Matteo <[hidden email]>:
Yes, I think it is Ok, to close the issue (as you already did).
And it is good to comment why this is closed and what method can be used instead.
Thank you Matteo.
|Free forum by Nabble - JMeter user||Edit this page|