01-18-2017 05:34 AM
Hello,
I have programmed testing equipment application. It works, but every test (loop) applications slows down.
Even realays on hardware clicking slowly.
After restarting program it works normally again for 5-10 tests.
I am using libmodbus library in that application and not using multithreading.
Does someone know where is the problem?
Regards,
Dovydas
01-18-2017 06:21 AM
Sorry but my PFT (Personal Fortune Teller) is not here at the moment, otherwise we could have him to take a look at your situation
Seriously speaking, it is difficult for us to give suggestions on your situation since we know nothing aboult it. You didn't even tell us if you are using a compiled executable or are running the program in the IDE!
You should at least check whether the delay is happening in your program calls or in external equipment(s) behaviour. Checking time spent in specific blocks of code or individual instructions may help in discriminating this.
Do you have huge memory allocation not properly disposed at test end?
01-23-2017 12:42 AM
@dovydas.p wrote:
...
Even realays on hardware clicking slowly.
...
Well, Roberto, I think a PFT won't help anyhow. It looks like his/her program is actually running relativistically fast.
I do not think you can speed it up anymore, but slowing down may help
01-24-2017 10:24 AM
Hi ebalci,
Could you please tell us more about the program? It'd be useful to know what it did and see some sample code if at all possible. As Roberto said, it'd also be extremely helpful to know if it's running as an executable or in the development environment. If it's in the development environment, could you keep track of the resources used with the resource tracking window? You'll need to enable "Extended Debugging" in the Build Options dialog box. Also, if there are any arrays or other memory structures, please keep track of what's being stored in them. Cumulative performance degredation like your seeing tends to be caused by something being used but not disposed of.
If it is a built executable, could you let it sit idle for some time (like a few hours) before running a test and see if that test is slower than you expect from a first run?