Page 1 of 1

Slow response in script editor

Posted: Thu Aug 15, 2019 2:39 pm
by kaveh1000
I have a script that is around 4500 lines. The script editor is quite slow to any keys. Using Indy 9.0.5rc1 on a Mac, Mojave.

Is this expected behaviour? Any hints as to making the editor more responsive?

Re: Slow response in script editor

Posted: Thu Aug 15, 2019 7:24 pm
by bogs
Just the usual suspects under 'options' in the edit menu of the script editor, i.e. live variables, matching brackets, etc.

Re: Slow response in script editor

Posted: Thu Aug 15, 2019 8:00 pm
by kaveh1000
Hi Bogs. I switched them all off but still a lag in typing. I delete a line and wait to see it deleted, etc. Any other ideas welcome.

Re: Slow response in script editor

Posted: Thu Aug 15, 2019 8:36 pm
by bogs
Just curious, do you have the project browser open?

Re: Slow response in script editor

Posted: Thu Aug 15, 2019 8:57 pm
by kaveh1000
No, I hardly every use the Project Browser

Re: Slow response in script editor

Posted: Thu Aug 15, 2019 10:39 pm
by SparkOut
I have often had the script editor do random and stupid things, as well as revert edits to previous versions even after having been changed and saved, often this coincides with poor responsiveness. (We're talking 30 seconds or more between keystrokes to seeing the characters appear on screen.) Sometimes scrolling up by a few lines, the scroll then continues by itself to the top. Or vice versa to the bottom. Sometimes the cursor doesn't match the insertion point on the script, so you think you're editing one line and after applying you can see the editor was attempting to change a different line. When these things happen, exiting LiveCode completely and starting again might help, but sometimes it's only good if you walk away for a while before restarting the IDE.
Apart from avoiding trying to move or update multiple objects with the Project Browser open, the best (but not cure-all effective) suggestion to improve responsiveness in the IDE I have found is to add exlusions to your anti-virus product for the LiveCode folders and your development folder. I wish there was a way of tracking down what is going on, but I have no recipe. I will say that there is improvement in 9.5 over other 9.x versions in terms of strict responsiveness (not that slow editing is completely cured). Other random strangeness still continues at intervals.

(Windows 10 here)

Re: Slow response in script editor

Posted: Fri Aug 16, 2019 9:18 am
by bogs
Is auto complete on or off? I was thinking more about your post, but don't have an environment suitable for testing on Mac. I came across this bug, which seems similar to yours.

If it is, you may want to add comments to it.

Re: Slow response in script editor

Posted: Fri Aug 16, 2019 9:45 am
by kaveh1000
Autocomplete is horrible and always off!

Re: Slow response in script editor

Posted: Fri Aug 16, 2019 4:08 pm
by dunbarx
I have never experienced this in any version, but I am on a Mac. Some of my scripts are thousands of lines long as well.

Are sure there are no handlers running? That is, one that sends a message "in time" repeatedly so as to create a "loop"? I do this all the time, and the SE responsiveness, properly, of course, is slowed.

A Windows thing? Sparkout?

Craig

Re: Slow response in script editor

Posted: Fri Aug 16, 2019 5:11 pm
by SparkOut
Yes, it is on Windows that I know this happens. I am reluctant to say "it's a Windows thing" as it's actually "a LiveCode thing that manifests on Windows".
No there aren't any messages being sent in <time> or loops. Autocomplete and such "helpers" are off.
It happens whenever it happens, no recipe.
The bug report is the best analysis I can relate to. It doesn't necessarily matter how big the scripts are. I very, very, very rarely have more than a few hundred lines in any script tab.
The most heartening thing for me is that the bug report indicated is marked as confirmed. It's now at least on the radar, whether anyone can/will address the issue very soon.