02-21-2010 08:24 PM
i have loop and sequence function.. for loop function must looping 15times for every looping, and must follow flat sequence. now, when i run the exe, it's very slow...
somebody can help me to make my NI run faster.....
02-21-2010 09:33 PM
02-22-2010 03:08 AM
Try to make sure you dont do unnecessary calculations in the loops, if they're not changing they're better wired from outside. Check if you really need the sequence and if some can be done at the same time.
That's a start.
/Y
02-22-2010 03:57 AM
snta1806 wrote:[...] now, when i run the exe, it's very slow...
somebody can help me to make my NI run faster.....
I don't get this: Is your application running slow when executed as executable (requires application builder to create one) and fast if executed as VI?
Norbert
02-22-2010 04:09 AM
02-22-2010 04:30 AM
@snta1806 wrote:
i had minimize the code [...]
You should further reduce the size of the code. A blockdiagram significantly larger than a single screen resolution is most often not easy to read and therefore it is hard to help you.
I think you should additionally switch to a producer/consumer architecture for further improvement of the code.
Since you are handling many strings and requesting quite some things from the database, this WILL take some time. Maybe, your algorithm could be improved, but since your code is not very nice to read, i am not really up to the task to dig into it.....
Norbert
02-22-2010 09:23 AM
One thing I can tell is that property node is incredibly slow down your code.
Eliminate them and try to transfer data with the help of wiring and shift register.
02-22-2010 10:10 AM
What's so important in the empty timeout that it needs to be done every 2 ms?
To me it looks like you should delete that completely for an infinite timeout, events are generated by actions, not polled.
Property nodes are _slow_ as mentioned, and value properties are generally not really useful.
You can skip several sequences (not as much performance as readability).
Access is slow, you'll get faster results by converting to SQL Express.
As all database queries are sub vi's i'm assuming you open and close the connection, which is also very slow. Keep the connection open and close it when you close the program.
I think the last 2 will generate the most speed.
/Y
02-22-2010 07:27 PM