11-02-2009 10:27 AM
Basically, I require a program that takes readings from my apparatus every tenth of a second and writes it to my hard drive. It starts fine but after 30 seconds or so it slows down to one reading per second. My program is pretty lean but there must be something in there that is slowing it down.
What can i use to to get a read-out of what processes my program is conducting and how long they take in order to find out what is cuasing delays in the execution?
11-02-2009 10:31 AM
Search on the term "benchmark" to find threads where we measured the performanc eof one construct vs another.
But if you post your code, the "my fellow wizards" can advise.
From your description I'll guess you are writing to file in the same loop as your collection process so serach on "Producer Consumer" to learn about a desgin pattern that decouples slow processes from fast threads.
Ben
11-02-2009 11:19 AM
TommyP wrote:What can i use to to get a read-out of what processes my program is conducting and how long they take in order to find out what is cuasing delays in the execution?
My guess is that your program does a lot of unecessary things. It would help if you could attach a simplified version of your code.
How are you writing to the HD? (express VIs, storage VIs, lowlevel file IO, a new file with every write, appending to an existing file, etc. ? Binary file, formatted text, etc.)
Do you keep the file open for the duration of the run or are you constanty opening and closing the file?
How much data is in one "reading"? (bytes, kilobytes, megabytes ?)