04-09-2015 06:13 AM - edited 04-09-2015 06:19 AM
Hi community
I have a fundamental question regarding performance and memory allocation.
In the past we sometimeise dealed with a "memory full error" massage and a corresponding labview crash.
These are happening usually on relativley long running applications with a fast aquisition rate.
Typical data rate is about 100000 SGL numbers per down to 50ms.
As it seemed that the reallocation of array elements may be the reason for the chrashes we are now intensively using IN PLACE structures to manipulate pre initialized array.
Here comes my question.
Is there a general rule when it is better to replace an array subset by the LV replace subset function or is it better to make some big loops as hown in my code for the replacements.
Personally I worry about these loops (or is ist just OK) and the compiler is clever enough to optimize these things.
Please state on both topics ---> CPU usage
---> Memory management problems
Thank you in advance
Cheers
Gernot
Solved! Go to Solution.
04-09-2015 06:32 AM
Just use Replace Array Subset. It is a single function that does what you want. And it does it in place (no memory reallocations). It is also likely (can't say for certain) that it will perform faster than the In Place Element Structure inside of a FOR loop.
04-10-2015 12:17 PM
Thank you for the clarification
Gernot