Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on January 18, 2021, 07:41:16 AM

Title: Lagging Ladder Editing Response
Post by: RBPLC on January 18, 2021, 07:41:16 AM
It seems as though the larger a project, the slower the keyboard and mouse response get inside of the ladder editor. I'm currently working on a project that is about 6k in memory usage size and every time I arrow key around or click on a portion of the ladder, I get a blue wheel for about a second. Arrow again, blue wheel. This essentially limits the speed at which one can navigate around the ladder and become tedious after a while. I've tried different settings, 3d tokens, 2d tokens, online, offline, status, no-status and none of these seem to help with navigation speed. Is this common?
Title: Re: Lagging Ladder Editing Response
Post by: ADC Product Engineer on January 18, 2021, 08:03:08 AM
I wouldn't think so, but it greatly depends on several things.

1. How much memory you have in your machine.  I won't run Win 10 on less than 8G and I really want 32G.  Overkill, maybe.  But I don't want the memory paging out
    to the hard drive.  It slows things down too much.
2. Speed of the CPU in your PC.  Not much that can be done on a laptop, but it does make a difference.
3. What other programs you might be running in the background.

#3 is the one that is easiest to control.  Windows Search eats up a ton of Hard Drive and CPU resources constantly indexing things.  It is one of the first things I turn off when I install Windows.  Likewise I turn off the Indexing for the Hard drive itself in the C:\ Properties window.  After that, It could be malware or just a plethora of programs that are eating up small bits of memory, CPU and hard drive time.  I don't usually recommend programs, but I have been using O & O Shut Up 10 to turn off the unneeded parts of Windows on my personal rig.  It seems to do a decent job and I haven't had issues using it yet.
Title: Re: Lagging Ladder Editing Response
Post by: RBPLC on January 18, 2021, 09:54:06 AM
Update:

I connected to the controller from another computer, downloaded the program and was able to navigate/edit around with no issue. I came back to my main computer, opened the link from the launchpad, connected to the controller, went online using the DISK project and same lagging issues. I exited DmD (on my main machine), opened the link from the launchpad, went online with the PLC project, saved this as a new project and now I can navigate around with no issues/lagging. Is there some reason that many saves/backups would cause this type of issue? 
Title: Re: Lagging Ladder Editing Response
Post by: franji1 on January 18, 2021, 02:10:18 PM
Can you email your "slow" .DMD project file to support at hosteng.com?
Title: Re: Lagging Ladder Editing Response
Post by: RBPLC on January 19, 2021, 05:42:14 PM
I'm not sure what exactly happened but I renamed the file (or save as, can't remember). Now when I load it, it doesn't lag. If it happens again, I'll email the project file.
Title: Re: Lagging Ladder Editing Response
Post by: RBPLC on January 24, 2021, 04:38:57 PM
Might have possibly figured it out. It starting doing this again to me. I think the lagging is related to the XRef. It looks like at some point I XRef'd something and then minimized the XRef window. I think XRef was on block or full scope and as I'm navigating around, responsiveness takes a dump. Close XRef and responsiveness comes back.
Title: Re: Lagging Ladder Editing Response
Post by: franji1 on January 25, 2021, 10:03:31 AM
I am seeing it in debug build w/the projects you emailed with a 20 code-blocks opened.  I turned off the XRef View along with the XRef tooltip, and it is much more responsive.  The XRef tooltip slowed it down more than the XRef View, I think.

Again, this is DEBUG build, so it is NOT optimized for speed (and actually has lots of "checks" for things that can slow it down that are NOT in the PRODUCTION/RELEASE build).
Title: Re: Lagging Ladder Editing Response
Post by: franji1 on January 25, 2021, 10:22:12 AM
Not sure if it's the number of code blocks, number of code blocks opened.

Definitely closing XRef View and disabling the XRef Tooltip (see Options->Ladder tab, bottom left corner is a group of tooltips).  The XRef database is probably huge for your project (program size x number of elements)
Title: Re: Lagging Ladder Editing Response
Post by: franji1 on January 25, 2021, 11:07:41 AM
I timed the XRef query for the popup.  In Debug build, it takes nearly a second (900+ms).  However, in Release build, it only takes ~40ms.  You might see a slight delay (25 Hz refresh rate ain't too bad).

However, I am on a pretty powerful PC, and this is with NO STATUS on (I am not connected to a PLC).

If you are doing a bunch of status, and a huge XRef database, your navigation could be slow.

What kind of PC do you have?  How many processors/cores/threads and memory?

If it's an older PC, you can definitely see Designer slow down to a crawl with some Trend Views, Data Views, 20 code blocks doing Status, and XRef queries on a single or dual core with 4G of RAM.  I have 8 cores, dual thread (so 16 logical processors) and 16 GB of RAM.
Title: Re: Lagging Ladder Editing Response
Post by: franji1 on January 25, 2021, 12:20:39 PM
I timed it on one of my online programs (300+ Ladder memory)  running 3 axis to draw a circle, and the debug build took ~40ms to do XRef lookup, and ~8ms in the Release build.

Your program is 40x as big program size and more than 100x memory usage than what I have in my small program.  So, yes, I can see XRef taking ~900ms in Debug build and ~40ms in Release build on my PC.