Refactoring is your friend / moving from 6.x to 9.x

Malte Pfaff-Brill revolution at
Fri Jan 4 06:40:53 EST 2019

>  Of course, the latter is making the assumption that 
> Malte has a Retina mac...
Indeed he has (now and did not back in the days where the app was written)

Actually I did not expect this thread to turn into philosophical discussions. What I was searching for was input on gotchas you guys and girls may have experienced when moving from the monolith engine to the refactored one., so that I would get an idea on what to look out for when continuing to refactor my old project(s). 

I was aware of the unicode related changes and am trying to remove all the stuff that has been deprecated (like charToNum, useUnicode, and the like). That is pretty well documented and understandable. Marks explanation on my redrawing issues are explanations that are understandable, make sense and I am aware now. The „fun“ part is, that something like this will never be able to be caught by unit tests or simple example stacks. One will need real world projects of a certain size to see the effect. To put things into perspective here, the app I am refactoring has to draw/redraw about 1500 controls, of which only a couple are changing positions / get a new label etc. Retina quite surely is a factor here. Also settings for „accelerated rendering“ might play a role.

While I applaud Currys effort to set up real world benchmarking stacks to compare between engines, I lack the self confidence to be convinced to write perfect code. I surely do not, especially if like in my case the number of lines of code go into the 10 thousands. I *try* to avoid redundancy . Most of the time I succeed and if I do find areas that are redundant, I refactor. The engine got a long way here. Behaviors, and nested behaviours (this me anyone?) are a very good example on how the engine matured over the years. I would not dare to expect that code written 10 years ago for an engine that was current 10 years ago is still useable without optimisations. I just have been away for too long to be able to know what to look out for.

I am indem looking forward to the array optimisations to come, as once that is off the table I am looking forward to actually having something that will be much faster than I had it in previous versions.



More information about the Use-livecode mailing list