On 2021-08-30 20:22, Ben Rubinstein via use-livecode wrote:
Thanks to Mark Waddingham's advice about using a buffer var when
accumulating a large text variabel in stages, I've now got a script
that took 8 hours under LC9, and (8 minutes under LC6) down by stages
to just under 1 hour under LC9.
Has anyone else noticed something of this sort? As I said, the effect
varies: e.g. 54 seconds versus 1 second; 22 seconds versus 1 second.
So it may not be so noticeable in all cases.
It will undoubtedly be the same problem as your accumulation slowness -
as the sort routines use (essentially) `put after` to reconstruct the
string after sort. So fixing the accumulation slowness will fix sort.
Indeed, there's a further optimization to be had in sort now I come to
think of it (probably relatively minor after the accumulation problem is
sorted) - the sorted buffer size (in chars) will be the same as the
input buffer size as its just a permutation of the lines - so the output
buffer can be pre-allocated at the right size.
We will endeavour to fix for 9.6.5-rc-1 (due 'real soon now'!).
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
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