Performance issues LC8 versus earlier versions.

Alex Tweedly alex at
Mon Aug 22 10:22:26 EDT 2016

Hi Monte,

here's the script - the actual file could be any 20Mb or so jpg.

on mouseUp
    put URL ("binfile:/Users/alextweedly/Dropbox 
(Personal)/Pictures/2016/101_0818/IMGP0021.JPG") into tData1
    put URL ("binfile:/Users/alextweedly/Dropbox 
(Personal)/Pictures/2016/101_0818/IMGP0021.JPG") into tData2
    -- put tData1 into tData2
    put the millisecs into time1
    repeat 5 times
       if tData1 = tData2 then
          add 1 to temp
       end if
    end repeat
    put the number of bytes in tData1 && the millisecs - time1 && temp 
into msg
end mouseUp

I would not have thought that caseSensitive should matter, since these 
are bytes not characters - or is that being naive of me ?

Would caseSensitive make it faster ?

Re md5 for repeated use - yes, it probably is worth doing. My original 
reasoning (no observed cases of the same size except genuine duplicates) 
was based on the incorrect benchmark (i.e. MY bug). In fact, I now know 
there are about 40 examples of this, so I'm probably going to need to 
reconsider that decision.

-- Alex.

On 22/08/2016 00:45, Monte Goulding wrote:
> Hi Alex
> It is always good to have them in the bug db so when know what people are running into. I know there was a big push during the LC 8 DP phase to try and get performance closer to LC 6.
> Actually after looking into this I wouldn't mind seeing your benchmark script as I can’t really see how MCDataIsEqualTo could be improved all that much. It first checks if the byte counts match (in your case it should return true here) and then uses memcmp to compare the data in memory directly.
> While it’s unrelated to LC 8 performance I’d personally be interested to know if taking an md5 or sha1 digest of each file and then comparing that would be faster. Probably not in a one off but this would be particularly critical if you are regularly comparing the same file with others. Also you probably want to set the caseSensitive to true for the comparisons.
> Cheers
> Monte
>> On 22 Aug 2016, at 8:40 AM, Alex Tweedly <alex at> wrote:
>> 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.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list