Persistent properties

This may not be an SD thing and may not be fixable, but it seems that persistent properties doesn’t work if the property value is sizable.

In the following script the BBEdit window has 1.75 million characters.

The hope was that in using persistent properties the script wouldn’t have to get the and coerce to list every run while debugging.

Doesn’t actually work. Every run the script has to get the text

property myText : {}
if myText = {} then
   tell application "BBEdit" to set myText to text of window 1
   set myText to paragraphs of myText
end if

I just ran your script against a document containing about two million characters, and it worked fine. Could it be something else in your script, like a top-level variable containing an ASObjC value?

Here’s an update. The issue persisted through SD relaunches, but went away after a mac reboot.

In the working script there were no ASObjc variables, just plain vanilla appleScript.

I did have several other scripts open at the time at various states of running and debugging, but not this script.

Sounds like something weird happening in the bowels of AppleScript itself.