10-18-2011 10:21 AM
Wow. The only approriate things with this project is that most VI names end in "BS". I could not agree more! 😄
Why are there 100 duplicate loops, each only differing by an array index diagram constant and each running in parallel every 100ms. Wouldn't it be sufficient to do a single instance of that code and iterate over all array elements instead?
50% cpu sounds suspiciously like a single CPU core pegged at 100% on a dual core machine. Most likely they UI thread gets hammered with these millions of thread swaps. Could it be that the 12-16% is on a 8 core machine?
10-18-2011 10:40 AM
For fun, I am running VI analyzer on it. We'll see.... ok....It's been 4 minutes and the progress bar is still near 0%. This might take a while 😄
In the meantime, see also this comment.
10-18-2011 11:07 AM
@smercurio_fc wrote:
But then, you have other problems with your VI:
- Your diagram is WAY TOO BIG. This isn't an issue just with you - it's an issue for anybode else who tries to modify your code down the road, or to try and, oh, I don't know, help you with a problem that you might be having.
Very rarely when I say "lol"do I actually laugh out loud. This time, though, lol.
10-18-2011 03:17 PM
I think I saw some SQL operations in all this. Perhaps all this or at least most of job. Can be done by a clever SQL query and then writing this query result.To a table
10-19-2011 10:25 AM - edited 10-19-2011 10:32 AM
Kudos for making me realize that the monster I inherited is just a furry little kitten with teeny little claws and ity bity teeth. Yes they are sharp and draw blood but it is no Siberian Tiger! And kudos for the bravery and strength to work with such a beast! If you took the time to learn "the right way" you would be awesome.
Oh and kudos for the pretty front panel. My only advice is to realize it is a Siberian Tiger and cannot be tamed. Unfortunately the best thing is to start over again. If it does what you need it to do then just get a faster computer. You can try turning off debugging which may help some but then, well, you wouldn't be able to debug it. But I suggest living with it while you refactor rewrite your program.
[Edit: pretty front panel - NOT block diagram (It's early)]
10-19-2011 10:42 AM
@Steve Chandler wrote:
[Edit: pretty front panel - NOT block diagram
(It's early)]
Obviously, you have not looked at the front panel via the navigation window... 😄
10-19-2011 10:47 AM
@altenbach wrote:
@Steve Chandler wrote:
[Edit: pretty front panel - NOT block diagram
(It's early)]
Obviously, you have not looked at the front panel via the navigation window... 😄
Oh dear! No I guess I didn't .
Well the part you can see looks good.
10-19-2011 10:51 AM
@altenbach wrote:
For fun, I am running VI analyzer on it. We'll see.... ok....It's been 4 minutes and the progress bar is still near 0%. This might take a while 😄
In the meantime, see also this comment.
So did this ever finish?
The OP seems to have abandoned this thread.
10-19-2011 10:59 AM
@smercurio_fc wrote:
So did this ever finish?
Yes, it only took about 10 minutes and ended up not looking too bad (relatively speaking, of course). Unfortunately, I used the default option and many analysis categories (e.g. about "value property use") gave up after five instances, while there were probably a few hundred more. 😄
10-19-2011 11:03 AM
I actually got up the nerve to start looking more closely at the code. In fact it looks very easy to refactor. It apears to be nothing but a copy and paste job gone wild. LOTS of duplicate code. Maybe nothing but duplicate code? I only gave it a cursory look because changing cases or sequence frames takes far too long on my Core i7-920 quad core multithreaded 64 bit Windows 7 machine with only 6GB of ram.
It looks like all those loops could be replaced with a SubVI. Remove the property nodes from the SubVI and replace them with terminals or better a cluster of the data. Remove the loop inside the SubVI and put an instance in a for loop indexing on an array of clusters containing the data used by the SubVI. Put that for loop in a while loop and there is your main top-level VI. That might not be the best way but I obviously have not studied each detail of your code.