Internal table overflow -2707

Greetings. I am writing here to possibly revive an old topic, but more to probe for updates on this topic, and perhaps any possible accommodations/enhancements in Sequoia 15.6 to alleviate these errors.

So first, does Sequoia contain any AppleScript enhancements or bug fixes (specifically re memory management)?

I have a somewhat complex set of 5-6 run-only apps. One control app which interfaces directly with the user plus a handful of stay-open apps which process operations in the background like Music, Numbers, Quicktime and so forth. Also, the control and one other app depend on the contents of an SQL database.

The control app is a tidy 1223 lines, 20 pages of code. It has about 3 pages of constants/variables and the rest is operational code. There is one main repeat loop which contains another nested repeat loop, and of course lots of if-then-else logic. Plus a handful of handlers/subroutines for efficiency.

The control app is 50% bigger than any of its stay-open apps, so is my primary concern. But still within the limits of 1000-1500 lines of code I am trying to adhere to. At present, I never encounter any overflow errors with it, as I have tried to optimize code and offload operations to stay-open affiliates wherever possible. This all seems to be working soundly, at present.

However, I cannot allow the control app to sneak up on me and die unexpectedly when I’m running it in “production” mode.

I found a terrific announcement in Late Night Software about “Table Overflow Errors” which helped me immensely with breaking up my code into modules (separate stay-open apps) and eliminating these errors. However, it also mentions “when your scripts start getting long, it is a good idea to start thinking about breaking them up, putting sections in script libraries”.

What is meant by this, and what would be examples?

For instance, let’s say I have blocks of code which use repeat loops to define several lists used throughout the app. Would these blocks be candidates to put in script libraries and why/how? Or what else?