LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

execution time increase

hai  guys,

 

Im currently developing a code that run 24 hours 7 days a week. My problem is the execution time increases as days pass by. As im tracing down the execution time ,the 1st day i start the to run the program execution time is 0.04 second but after 3 day it increases to 4.5 seconds .

 

then i indually tracked down the subvi that causing problem and find out that the problem is on writing to ini file.

The subvi function is to REPLACE the data (20 data )in a file every 10 second*not accumulating data just replace the old data  . I open file replace data and close file every itteration and as day pass the execution time for this subvi increases.

 

Can any one help me to get a solution for the problem as time is a very important factor in my programming. the execution time is limited for less that 10 second.

 

thanks

 

regards

kokula 

0 Kudos
Message 1 of 7
(2,990 Views)

Hi Kokula

 

Any chance you can post the code? Also, have you checked the memory consumption of your application while it runs? You can do this with the taks manager. Check if it is steadily growing as time passes.

 

Best Regards

 

David

NISW

0 Kudos
Message 2 of 7
(2,983 Views)
Separate ini logging to another loop, and use either notifier or queue to send data between loops.
0 Kudos
Message 3 of 7
(2,958 Views)

 hai dave,

 

 

I check the memory consumption and its increasing gradually. started with 47MB and in 1 day wen up to 350MB and its gradually increasing. 

the ram usage also increasing. Will dealocate memory play a role in this(dealocate memory every day????)

 

regards,

shamaran 

0 Kudos
Message 4 of 7
(2,951 Views)

As David said, post the code.

 

Is there any reason why your are loggin to an .ini file?  Does that mean you are using the LabVIEW config file functions?

 

I don't know if deallocating memory would help, or is even possible, without seeing your code.  You either have a problem with resources continuously being created, but not being closed out.  Or you have an ever growing array.  This takes more memory over time, and slows down the code because LabVIEW has to move memory around to account for the ever larger array.

 

I bet if you let your program run long enough, it would eventually crash due to running out of memory.

 

By the way 47MB to 350 MB of memory consumption means the same thing as RAM usage increasing.

 

 

Message 5 of 7
(2,942 Views)

Hi shamaran

 

I agree with everything Ravens Fan said. If you have the Desktop Execution Trace Toolkit you can monitor the memory allocations/deallocations your program makes and see where the increase is happening. Otherwise, the only way we can help you is if you post the code so we can have a look.

 

Best Regards

 

David

 

 

0 Kudos
Message 6 of 7
(2,930 Views)

Hi!

Are you closing the file reference properly? Or are you opening a new reference each call?

If not this is a source of memory loss.

 

Greets CR

 

Message Edited by CtheR on 03-16-2010 05:06 AM
0 Kudos
Message 7 of 7
(2,923 Views)