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.

Re: Slow response in script editor

Posted: Mon Oct 25, 2021 3:25 pm
by kaveh1000
Hi folks

Sorry about the 2 year absence!!

I have just restarted my stacks on Mac Big Sur, using LiveCode 9.6.4.
  • I have checked in Message Watcher that there are no background tasks running
    I have switched off likely culprits like Autocomplete – see screenshot
The Script editor is painfully slow and almost unusable. If I press the up/down arrow for too long, then I have to wait a few seconds while the text scrolls. Please see video here:

https://drive.google.com/file/d/1gvdjpr ... wPMvS/view

I have shift selected with arrow, then release arrow after around 1 second. Then have to wait for script editor to catch up. The effect is seen even on small scripts of say 40 lines, and on scripts of around 4000 lines.

The shift selection is to to make the delay clear. Same happens with no shift.

Any ideas pl?

Kaveh

Re: Slow response in script editor

Posted: Wed Dec 15, 2021 1:51 am
by shrink2fit
I am also trying to figure out why scrolling (and line updates) are slow in the script editor. Scrolling using the scroll bar works fine, but scrolling using the track pad (two finger scroll on latest version of Monterey) has notably sluggish response. If I scroll repeatedly (multiple two finger swipes) the text in the field scrolls adequately but when I stop scrolling the field contents continues to scroll. This disconnect is disturbing. Are others seeing this behavior? Is there a setting to turn off? I am running 965 on a 2021 MacBook Pro 16 with plenty of performance so it should be very responsive.

Thanks!

Jonathan

Re: Slow response in script editor

Posted: Wed Dec 15, 2021 7:42 am
by AndyP
Win 10, LC 9.6.2

I've noticed that the problem of sluggish script editor tends to start after having the message box open and use.

It feels like a hang in message passing. The script editor becomes sluggish, there is a wait time before buttons in the whole of the ide are functional, button presses seem to be captured and queued, up down arrows in property inspectors grab hold of a press and continue to function after mouse release, continuing to scroll through their respective values.... not Ideal.

The effect is accumulativ, increasing in severity after each message box opening and use.

The only way to negate these problems is to close and restart LC.

I also check the task manager to make sure that LC has closed properly as sometimes I've noticed that after the sluggish problems, LC will still be active, but not visible after shutdown, this If unnoticed causes all manner of problems with any new instance of LC.

I've logged memory and CPU usage during these events and have not seen any severe spikes which again tends to in my mind point to a message passing issue.

Very hard to tie down and quantify.. very frustrating!

Re: Slow response in script editor

Posted: Wed Dec 15, 2021 10:54 am
by mrcoollion
Hi all,

I have the same problem. I have 7000+ number of script lines in the main stack and even an enter for a new line took over 10 seconds to register.
I split up a large part (4800 lines) to a substack and that worked for the main stack but editing in the substack is still slow (7 seconds for an enter to register). I can split this substack into multiple sub stacks but for now I do not want to go this far.

Working with LC 9.6.5 on Windows 10.

Regards,

Paul