How does LC work?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

How does LC work?

Post by dunbarx » Mon Mar 28, 2022 7:33 pm

I have, in my largest project, a little routine that counts both the number of actual "working" lines and also the number of total lines in a mainStack and a handful of its substacks. For what it is worth, about 13,000 and 19,000 lines

If I open the mainstack and run that routine it takes about 13 seconds to complete. It does have to do the usual, go to every control on every card in both the mainStack and a half dozen substacks. All card and stack scripts, etc. Well and good.

But if I run the routine again, it takes only 0.5 seconds. If I close the mainStack, re-open and run again, 13 seconds. And so on...

Where and how is LC caching the means to run that routine? In other words, how do it know that the routine was just executed? In yet other words. what changes when the mainStack is closed?

Craig

Post Reply

Return to “Talking LiveCode”