Slow response in script editor
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Slow response in script editor
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?
Is this expected behaviour? Any hints as to making the editor more responsive?
Kaveh
Re: Slow response in script editor
Just the usual suspects under 'options' in the edit menu of the script editor, i.e. live variables, matching brackets, etc.
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Slow response in script editor
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.
Kaveh
Re: Slow response in script editor
Just curious, do you have the project browser open?
Re: Slow response in script editor
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)
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
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.
If it is, you may want to add comments to it.
-
- VIP Livecode Opensource Backer
- Posts: 9747
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Slow response in script editor
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
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
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.
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.
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Slow response in script editor
Hi folks
Sorry about the 2 year absence!!
I have just restarted my stacks on Mac Big Sur, using LiveCode 9.6.4.
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
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
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
Kaveh
-
- Posts: 5
- Joined: Wed Jan 14, 2015 12:03 am
Re: Slow response in script editor
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
Thanks!
Jonathan
Re: Slow response in script editor
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!
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!
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- Posts: 722
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Slow response in script editor
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
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