Hi Folks

I was a bit perplexed by this so I had a quick look about the engine and I see 
the issue. The problem is you are using `offset` which works on characters. 
Characters in LiveCode are neither unicode codepoints or bytes. They are 
graphemes. This means that when you have chars to skip the entire string needs 
to be parsed to find the grapheme boundaries so that the index can be 
translated into graphemes to skip. Note that if the strings you were dealing 
with weren’t unicode then the translation of chars to graphemes is 1 -> 1 so 
there’s no big cost which is why things are much faster when you textEncode and 
offset that.

So! Change to using codepointOffset and hopefully it will be much speedier!

Cheers

Monte
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to