You can improve the performance of WSN applications in the following ways:
Avoid unnecessary memory allocation and deallocation by not using heap-allocated data types, such as arrays, clusters and strings. While clusters are supported, National Instruments recommends avoiding clusters, including error clusters, in WSN applications because clusters increase the size of the application.
Avoid using large constants, such as arrays, inside loops. Avoid building arrays inside loops.