Performance issues LC8 versus earlier versions.
Alex Tweedly
alex at tweedly.net
Sun Aug 21 18:40:16 EDT 2016
I just discovered that part of my simple benchmark code I was doing for
my photo apps was incorrect.
I was being caught out (I think) by the implementation of
'copy-on-write' in LC8.
My simple benchmark did (in essence)
put URL("binfile:/path/to/verylargefile.jpg") into tData1
put tData1 into tData2
if tData1 = tData2 then ....
Now in earlier versions of LC, it would actually *do* that comparison.
But in LC8 it doesn't - since there's been no further write done to
either variable, they are references to the same piece of data, and
hence the time to do it is effectively 0, whereas back in LC6.7 that
comparison took 20ms.
Sadly, having fixed it to be a proper benchmark by changing the code to
be effectively,
put URL("binfile:/path/to/verylargefile.jpg") into tData1
put URL("binfile:/path/to/verylargefile.jpg") into tData2
if tData1 = tData2 then ....
I now find that LC6.7 still takes 20ms, but LC8.1 now takes 40ms - a 2x
performance loss.
I was about to create a QCC report, but found that there are a number of
performance issues confirmed but still outstanding, and I suspect this
could be a duplicate of one of those (15448 also discovered while
working on JPG files, reported by me against LC7 over a year ago).
I'm hoping to get some idea from the team when they might tackle these
performance degradations in non-Unicode related code, or whether I
should just go back to an earlier version for now.
Thanks
-- Alex.
More information about the use-livecode
mailing list