A bug with huge lists in debugging mode but not in normal mode

Continuing the discussion from Every item of a list whose:

I have a huge list of items (every movie on TV during a week) and I’m using Nigel’s handler to extract subsets of data from that list.

When I work with small lists it works just fine. But in Script Debugger in debugging mode, when I work with the really big list it errors out with:
AppleScript Execution Error

Internal table overflow.

-2,707

If I turn off debugging mode it seems to do fine.

Is this a bug worth tracking?

Probably not. Debugging mode obviously adds extra instrumentation code, and in this case it appears to be tipping something beyond AppleScript’s limits. There’s not a lot you can do about that, other than treat it as a warning that you’re possibly sailing close to the wind even outside debugging mode.

So before I started working on this script it would take about 10 minutes to run.

After optimizing and removing cruft and using some ASObjc stuff I got that down to about 90 seconds.

Adding Nigel’s script objects to build subsets, it’s more like 10 seconds.

If I really want to taste the wind, I could run the same script with three weeks of data instead of one.