Refactoring is your friend / moving from 6.x to 9.x
Curry Kenworthy
curry at pair.com
Sun Jan 6 16:24:19 EST 2019
Richard:
> If you're satisfied the the progress on yours then of course you
> can safely ignore my passing that along.
Thanks Richard - all great things to bear in mind, when kept realistic.
Areas affected by performance were pretty widespread, so it'll be easier
to isolate any remaining areas and create new tests once the current
memory/array/other improvements are in place. That will be an exciting
followup.
But looking at LC Mark's optimization items, I am quite pleased with the
progress so far and the approach taken. My tests and others have been
converted to benchmarks, and a variety of improvements have been
tackled, so I think very good things are in store sooner or later. I
have always believed and promoted that LC 9 beating 6 on speed would be
possible and desirable, and that day may come soon. Very invigorating.
My thanks again to LC Mark for these optimization efforts!
Malte:
> And of course, please also be vocal on the positives!!!
That's easy; we're always positive! :D There are so many additions in LC
7-9 that it would take a while to discuss, but here are some that were
significant for me.
One of my favorites was column tabAlign in fields. Many LiveCoders still
don't realize that they can often use a single field rather than a data
grid for displaying tabbed text. With those column alignments fully
supported as of LC 9, all the more incentive to keep stacks lean and
mean when building new or updating. The only thing still lacking is word
processing style tab aligns for normal text, and of course an option for
column text wrap would be a huge improvement.
Another item I enjoyed and used for refactoring is the "resolve" keyword
for images. Not only good for optimization, but also for accuracy and
avoiding conflicts. That's what I consider a completely positive example
of refactoring, because it's a definite improvement over even the best
LC 6 code, rather than an arbitrary change or correcting bad habits.
I was less impressed by the new textDecode function, because while it
results in cleaner code (and you should use it to ensure accuracy) the
performance was actually worse than legacy LC 6 methods, if memory
serves, and in this case I'm talking about an LC 9 versus 9 speed
comparison with those respective sets of code. It shouldn't be slower,
if indeed it is; my legacy methods were even jumping a few extra hoops
for the sake of ~100% Unicode accuracy on older LCs, so textDecode had
every advantage. That's probably another enhancement request I should
test and file, the first chance I get.
Best wishes,
Curry Kenworthy
Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/
More information about the use-livecode
mailing list