If your clusters contain strings or arrays (variable-length data), the actual data lives on the heap. The cluster stores a handle (pointer) to that heap data. Frequent resizing of the outer array can lead to fragmentation.
| Do | Don't | |----|-------| | for the cluster. | Hardcode cluster element names as strings. Use Bundle By Name . | | Use Bundle By Name when modifying a single element inside a cluster. | Nest arrays inside clusters unless necessary (can become hard to read). | | Initialize empty arrays with Initialize Array using an empty cluster constant. | Assume order of cluster elements; always label them. | | Use Search 1D Array cautiously. It only works if the entire cluster matches. To search by one element, use a For Loop with Unbundle . | Use Variants inside clusters unless you need dynamic data types. They add overhead. | 1d array of cluster of 2 elements labview
LabVIEW stores clusters as contiguous blocks of memory. A large array of clusters is generally efficient, but if the elements inside the cluster are complex (like nested strings or large arrays), memory fragmentation can occur. If your clusters contain strings or arrays (variable-length