OK to pass big data in 'the result'?
Ken Ray
kray at sonsothunder.com
Thu Mar 15 21:21:42 EDT 2007
On Fri, 16 Mar 2007 00:23:10 +0000, Mark Smith wrote:
> If the data is really big (which i guess is relative to how much RAM
> you have), then you're duplicating it, which could be quite
> inefficient ie. noticeably slow.
Good point, Mark... although it might be more of an issue with RAM than
speed. Perhaps better would be to use pass-by-reference variables so
the data isn't duplicated:
on processRecords
getRecords tRecordList
repeat for each line tLine in tRecordList
-- your code here
end repeat
end processRecords
on getRecords @pVar
put the uBigList of stack "XYZ" into pVar
delete stack "XYZ" -- to remove it from memory
end getRecords
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list