Livecode performance problem

Mark Smith marksmithhfx at gmail.com
Sun Aug 21 17:36:28 EDT 2022


Wow, what a great example. I decided to work through the various suggestions just so I could get a better grip on some of LC’s more sophisticated data handling commands. 

My original run using Paul’s example was 8 seconds (2000 lines per field, 1100 chars per line)
Applying Brian’s simple suggestions of using “after” instead of “into” cut that in half (4 seconds)
Splitting the lines and using an array drove the time down to 23 milliseconds. Amazing!
Between those 2 that's 8000 msec -> 23 msec or about  350 times faster.

I will definitely pay more attention to “split” in future.
Great discussion. 

Mark




> On 20 Aug 2022, at 12:50 am, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> On 8/19/2022 7:40 PM, Mark Wieder via use-livecode wrote:
>> On 8/19/22 16:31, Alex Tweedly via use-livecode wrote:
>> 
>>> to trim about another 15% off the time (for my sample data, 24ms down to 20ms.)
>> 
>> Nice.
>> Note, of course, that we're all going on the assumption that all four fields contain the same number of lines.
>> 
>> 
> 
> Thank you all for the example of improving performance over my clunky code.
> 
> Yes, all the fields contain the same number of lines.
> 
> For strange legacy application reasons, when lines get added to the set of fields (a frequency action by users - sometimes adding hundreds of lines a day), the data has to be repackaged into this tab delimited structure in a single variable to run some procedures on.
> 
> So a user driven action of:
> 
> 1) Add a line (or a few) to the fields
> 2) repackage data and run a few procedures
> 3) User repeats starting at step 1
> 
> Can become very slow as the number of lines in the fields gets large - as you all have noted!
> 
> Thank you all again!
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list