11-04-2024 11:08 AM
I am certain the the top level state machines would have a higher complexity but I haven’t looked at this. Most VIs are pretty lean and mean though.
11-08-2024 11:37 AM
I've had issues in the past where my memory starts to fill up because I've been feeding data to a consumer loop that utilized TCP messaging. Unexpected network delay would lead to spikes in memory until the transmission either sped back up or it eventually crashed. You mentioned one of your modbus comm VIs is talking via TCP and is executing more slowly. Is that comms basically a consumer of queued messages or is it just sequential in your application's operations? You could always try to disable the Nagle algorithm if it's only the communications-based portions of your application that are exhibiting a slowdown, but unless those are the cause of the memory increase I don't really know if it would have an effect.
11-09-2024 11:53 AM - edited 11-09-2024 12:11 PM
@Mark_Yedinak wrote:
I am certain the the top level state machines would have a higher complexity but I haven’t looked at this. Most VIs are pretty lean and mean though.
Also remember that any inlined subVI will increase the complexity of the caller, so make sure to use that option sparingly for any VI on the toplevel diagram. That said. I doubt that the compiler would cause your memory issues at runtime.
Even if the complexity threshold is set to 10, the compiler will reduce optimizations below even half that, if I remember right. (there might be an old discussion or slide presentation. Will try to find it)
11-09-2024 12:23 PM
@altenbach wrote:Also remember that any inlined subVI will increase the complexity of the caller, so make sure to use that option sparingly for any VI on the toplevel diagram.
In addition, at least in 2024Q3, it appears that in-place memory structures also increase the complexity.
Lastly, after reading this thread and checking the complexity of some of my VIs, I found a curious result. If I cut and pasted a complex diagram into a new VI its complexity was reduced until I saved it, then it increased again. Not sure if that is standard or a possible issue.
11-10-2024 12:05 PM - edited 11-10-2024 12:34 PM
Hi
My first try when experiencing such issues is restoring the computer from a proper backup. To get back to a previous working state. And then work forward in small steps ..
But, you mention that the working version is using LabVIEW 2018. You probably remember that NI killed the hybrid compiler in LabVIEW 2019. This means applications with -very- complex toplevel VI's either crash, behave slowly, edit slowly or maybe exhibit other nasty behaviors. The hybrid compiler was introduced in LabVIEW 2010 SP1 after NI introduced the new inline optimizing compiler in LabVIEW 2009.
I have an application that must stay in LabVIEW 2018 for this very reason.
Regards