This content has been marked as final. Show 4 replies
I'm not sure how much more efficient it will be, but the code does execute
7000 unnecessary if-then statements where you check whether or not to append
RETURN. Try appending RETURN everytime (without the if-then statement) then
just remove the last (unnecessary) RETURN that will be at the end. Something
repeat with nn = 1 to totalRecs
set theList = theList & fullData[nn]& return
-- add code to remove the last char if it is a RETURN
Back in the days of DIrector 5, I discovered that it was faster to populate a field member with text if the field member was not on the Stage at the time. I have not tested recently to see if this is still true.
You might also try the put... after..syntax which I think may be faster than using '&'
put fullData[nn] after theList
put RETURN after theList
For fields (box type set to scrolling), the following will speed things up a bit (assuming your field is sprite 1):
sprite(1).visible = 0
sprite(1).member.text = newStr
sprite(1).visible = 1
Surprisingly (last time I checked), #text member were populated with text way faster than fields - so you might also want to try using a #text member.