DFGray
unread,Jun 3, 2005, 9:11:01 AM6/3/05You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
A subVI will always cost you more in time than a flat diagram, although that overhead is usually pretty small. Only you can make the tradeoff between maintainability and speed. If you care about it, you should benchmark several variations and find the best - it is not always obvious.<br><br>One of the reasons you are having trouble finding information on how data is passed in LabVIEW is that it is extremely complex and changes from LabVIEW version to LabVIEW version, so tends to not be documented. Since LabVIEW does memory managing for you, it tries to be smart about how it does it. This has improved dramatically in the last few versions. The newer your version of LabVIEW, the better off you are. This is especially true for clusters. In LV6.0, unbundling a cluster caused a copy. In LV7.1, a copy will only be made if necessary to ensure data integrity. Once again, the gold standard is benchmarking your application and modifying it until it is good enough.<br><br>One final comment on locals for readers of this thread. Use of locals is a guaranteed way to slow down your program. Reading a local requires a trip through the UI thread and a copy of the data. Reading a wire or unbundling and reading is simply pulling a value from memory. The difference in speed is somewhere around one or two orders of magnitude (yes, I did mean 10 to 100) and could be more. I haven't benchmarked it lately. You have already been bit by race conditions using locals, so I won't flog that dead horse.