Slow response in script editor

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Slow response in script editor

Post by kaveh1000 » Thu Aug 15, 2019 2:39 pm

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?
Kaveh

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Slow response in script editor

Post by bogs » Thu Aug 15, 2019 7:24 pm

Just the usual suspects under 'options' in the edit menu of the script editor, i.e. live variables, matching brackets, etc.
Image

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Slow response in script editor

Post by kaveh1000 » Thu Aug 15, 2019 8:00 pm

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

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Slow response in script editor

Post by bogs » Thu Aug 15, 2019 8:36 pm

Just curious, do you have the project browser open?
Image

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Slow response in script editor

Post by kaveh1000 » Thu Aug 15, 2019 8:57 pm

No, I hardly every use the Project Browser
Kaveh

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: Slow response in script editor

Post by SparkOut » Thu Aug 15, 2019 10:39 pm

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)

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Slow response in script editor

Post by bogs » Fri Aug 16, 2019 9:18 am

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.
Image

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Slow response in script editor

Post by kaveh1000 » Fri Aug 16, 2019 9:45 am

Autocomplete is horrible and always off!
Kaveh

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Slow response in script editor

Post by dunbarx » Fri Aug 16, 2019 4:08 pm

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

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: Slow response in script editor

Post by SparkOut » Fri Aug 16, 2019 5:11 pm

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.

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Slow response in script editor

Post by kaveh1000 » Mon Oct 25, 2021 3:25 pm

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
Attachments
Screenshot 2021-10-25 at 14.57.16.png
Kaveh

shrink2fit
Posts: 5
Joined: Wed Jan 14, 2015 12:03 am

Re: Slow response in script editor

Post by shrink2fit » Wed Dec 15, 2021 1:51 am

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

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Slow response in script editor

Post by AndyP » Wed Dec 15, 2021 7:42 am

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!
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

mrcoollion
Posts: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Slow response in script editor

Post by mrcoollion » Wed Dec 15, 2021 10:54 am

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

Post Reply

Return to “Mac OS”